Skip to content

Fixed: Diagnostic report not sent when email client was installed.#4816

Open
MohitMaliFtechiz wants to merge 1 commit intomainfrom
Fixes#4814
Open

Fixed: Diagnostic report not sent when email client was installed.#4816
MohitMaliFtechiz wants to merge 1 commit intomainfrom
Fixes#4814

Conversation

@MohitMaliFtechiz
Copy link
Copy Markdown
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented Apr 14, 2026

Parent Issue #4813, Confirmed by #4813 (comment).

  • Some newer email clients were not included in our supportedEmailPackages list, causing the app to incorrectly show the message "Please install an email client" even when a compatible app was present. Added several missing email clients to this list.
  • This filtering approach was originally introduced in Fixed: Send diagnostic report does not attach the device logs in Google Pixel 7a. #4096 due to Send diagnostic report does not attach the device logs in Google Pixel 7a #4095 to avoid showing addtional apps.
  • Since maintaining a complete list of all email clients is not reliable/future proof. New apps can be introduced at any time. Most major/minor clients are already included and are widely used, but some users may use other email clients. So some email apps can be ignored. To handle this, a fallback mechanism has been added: if no supported email app is found, the app opens the default system chooser, allowing users to send the report via any other available email app.

* Some newer email clients were not included in our supportedEmailPackages list, causing the app to incorrectly show the message "Please install an email client" even when a compatible app was present. Added several missing email clients to this list.
* This filtering approach was originally introduced in #4005 to avoid showing non-email apps (e.g., WhatsApp/Signal) in the chooser.
* Since maintaining a complete list of all email clients is not reliable (new apps can be introduced at any time), some valid email apps may not be detected. To handle this, a fallback mechanism has been added: if no supported email app is found, the app opens the default system chooser, allowing users to send the report via any available app.
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

❌ Patch coverage is 76.47059% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.78%. Comparing base (0c6c653) to head (cc50d5e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../org/kiwix/kiwixmobile/core/error/ErrorActivity.kt 76.47% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4816      +/-   ##
============================================
+ Coverage     60.47%   60.78%   +0.31%     
- Complexity     1669     1672       +3     
============================================
  Files           333      333              
  Lines         16037    16049      +12     
  Branches       2224     2225       +1     
============================================
+ Hits           9698     9756      +58     
+ Misses         4870     4829      -41     
+ Partials       1469     1464       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kelson42
Copy link
Copy Markdown
Collaborator

kelson42 commented Apr 14, 2026

@MohitMaliFtechiz What you say here is that Android is not able to just/easily give you the email client (or the list of email clients installed)? I can hardly believe this.

We shoukd not have such hardcoded list of client, this can only fail.

From #4005 (comment), I though we agree to avoid using attachment and therefore have this unmaintainable hack?!

@MohitMaliFtechiz
Copy link
Copy Markdown
Collaborator Author

MohitMaliFtechiz commented Apr 14, 2026

@kelson42, it gives us the email apps list, but not directly. We set the intent filter ACTION_SENDTO with data = "mailto:, then it only shows us the email client list. We had introduced this fix in #4005.

We shoukd not have such hardcoded list of client, this can only fail.
From #4005 (comment), I though we agree to avoid using attachment and therefore have this unmaintainable hack?!

Sorry, my bad :( . After introducing the #4005, we faced this issue #4095. Where logs are not fully attached in emailBody due to large size. So we have added this thing in #4096.

We shoukd not have such hardcoded list of client, this can only fail.

It was the only option to keep the fix of #4005. Otherwise, it will show every app in suggestions when sharing the diagnostic report with the log file. This is the only option to keep both log files in email and not show the other app in the list.

Now, we have included most of the email client, major people use these email clients. So it will always show the supported email clients. For those who do not have these email clients installed(using some new client), then the fallback intent will show where all the supported apps will show who handles this intent(with remaining email clients).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants