ACRA / acra

Application Crash Reports for Android

Home Page:https://www.acra.ch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MailSender does not open GMail (Android 14)

BlazeCodeDev opened this issue · comments

Required reading
http://www.acra.ch/docs/How-to-debug

Describe the bug
The mail sender does not fire up on my hardware device (Android 14 Beta 1.1), but does so on my emulator running Android 13. Both devices have only GMail as mail client installed. The app in question is of course the exact same version on both devices.

Expected behavior
I click send in my dialog and the e-mail client opens with the file attached.

Config:

initAcra{
    coreConfiguration {
        withBuildConfigClass(BuildConfig::class.java)
        withReportFormat(StringFormat.JSON)
    }
    mailSender {
        mailTo = resources.getString(R.string.email_address)
        reportAsFile = true
        reportFileName = "error_report.json"
        subject = "TSViewer - Error Report"
    }
    dialog {
        enabled = true
        reportDialogClass = ErrorReportActivity::class.java
    }
}

Queries have been added to the manifest:

<queries>
   <intent>
       <action android:name="android.intent.action.SEND" />
   <data android:mimeType="message/rfc822" />
</intent>
   <intent>
       <action android:name="android.intent.action.SEND_MULTIPLE" />
       <data android:mimeType="message/rfc822" />
   </intent>
</queries>

The mailSender is being implemented like this:

private lateinit var helper: CrashReportDialogHelper
helper = CrashReportDialogHelper(this, intent)
helper.sendCrash(userComment.value, userEmail.value)

The only difference I noticed in the log is right after Finished sending reports from SenderService. On the virtual device on which it is working I can see is this additional line:
com.google.android.gm opened /data/user/0/com.blazecode.tsviewer/cache/error_report.json
It obviously just states that an app in this case Gmail picked up on the intent, but on my device running A14 this is missing.
I'm guessing acra is having trouble deciding which mail app to open, but I could be wrong here.

These are the full logs of both devices right after triggering the crash:
acra_A14_not_working.txt
acra_A13_working.txt

Version

  • Android: [14 (UpsideDownCake (UPB1.230309.017))]
  • ACRA [5.9.7]

Have you tried with ACRA 5.10.0-beta03?

Using beta03 it does actually open the app picker, but when I select GMail it does not open the app, the chooser just closes.
I found this in the log, maybe thats why GMail doesn't open : No email client supporting attachments found. Attachments will be ignored
Full log beginning with me triggering a crash:
acra_A14_5.10.0-beta03.txt

Queries have been added to the manifest

This should not be necessary as ACRA already includes those.


Unfortunately the only Android 14 device available to me is the emulator, where everything works as expected.
Your last log doesn't seem to be filtered correctly, nor does it include debug information.

All I can say at this point is that this is not a general Android 14 issue, which is good.

Which device are you using? Can you post logs as described in http://www.acra.ch/docs/How-to-debug?