0

How can I get my app listed in the app chooser screen when sharing the bug reported generated by the android device. The bug report which can be generated using the USB debugging developers options. I have tried adding all the mime types in the data field. But still I am not able to see my app listed in the app chooser. The bug report generates a .zip file and a .png file. So, I have added application/* and image/* types.

<intent-filter>
    <action android:name="android.intent.action.SEND" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="application/zip" />
    <data android:mimeType="audio/*" />
    <data android:mimeType="image/png" />
    <data android:mimeType="message/*" />
    <data android:mimeType="multipart/*" />
    <data android:mimeType="text/*" />
    <data android:mimeType="video/*" />
</intent-filter>
Cory Charlton
  • 8,868
  • 4
  • 48
  • 68
Rakshith
  • 1
  • 1

2 Answers2

0

I'm not 100% but I believe multiple <data ...> entries in your filter might be tripping you up. In order to debug I would start with a single <data android:mimeType="*/*" /> entry and confirm your application appears in the chooser.

If it does then you could check the Intent.getType() to determine what MIME type is actually being sent. From there you could add multiple filters for every expected type as shown in the documentation.

<activity android:name=".ui.MyActivity" >
    <intent-filter>
        <action android:name="android.intent.action.SEND" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="image/*" />
    </intent-filter>
    <intent-filter>
        <action android:name="android.intent.action.SEND" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="text/plain" />
    </intent-filter>
    <intent-filter>
        <action android:name="android.intent.action.SEND_MULTIPLE" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="image/*" />
    </intent-filter>
</activity>
Cory Charlton
  • 8,868
  • 4
  • 48
  • 68
0

This appears to answer you question for you. Its long so I won't copy it here.

https://stackoverflow.com/a/16232417

android.intent.action.APP_ERROR Seems to be the intent filter you need to support to handle ANR/crash reports.

Community
  • 1
  • 1
mawalker
  • 2,072
  • 2
  • 22
  • 34