My app won't show up on the chooser dialog for android.intent.action.VIEW with mime type video/* only on Marshmallow

casolorz

Basically when an app shares a video url my app is supposed to show up on the list but it doesn't. Neither does MXPlayer but the Google Photos media player shows up fine as well as allcast (which had a recent release to fix this).

I wrote a quick app to test this issue, here are my manifest filters:

<intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

<intent-filter>
    <category android:name="android.intent.category.DEFAULT"/>
    <data android:mimeType="text/plain"/>
    <data android:mimeType="video/*"/>
    <data android:mimeType="audio/*"/>
    <data android:mimeType="image/*"/>
    <action android:name="android.intent.action.SEND"/>
</intent-filter>

<intent-filter>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <data android:mimeType="video/*" android:scheme="http"/>
    <data android:mimeType="audio/*" android:scheme="http"/>
    <data android:mimeType="image/*" android:scheme="http"/>
    <data android:mimeType="video/*" android:scheme="https"/>
    <data android:mimeType="audio/*" android:scheme="https"/>
    <data android:mimeType="image/*" android:scheme="https"/>
    <data android:mimeType="video/*" android:scheme="file"/>
    <data android:mimeType="audio/*" android:scheme="file"/>
    <data android:mimeType="image/*" android:scheme="file"/>
    <action android:name="android.intent.action.VIEW"/>
</intent-filter>

<intent-filter>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <data android:host="*" android:pathPattern=".*\\.mp4" android:scheme="http"/>
    <action android:name="android.intent.action.VIEW"/>
</intent-filter>

And this is the code to reproduce the issue:

Intent intent = new Intent("android.intent.action.VIEW");
intent.setDataAndType(Uri.parse("http://media.w3.org/2010/05/sintel/trailer.mp4"),"video/*");
startActivity(intent);

This is only an issue on Marshmallow.

EDIT: I should add that not all Marshmallow devices do this. It took me a long time to reproduce it from the first time I heard about it and one day it just started happening on my Nexus 5. My 6P won't reproduce this.

EDIT: I added some debugging code prior to startActivity. Basically I'm asking the package manager to give me the intent activities that can handle that intent and I get back the exact same list I see on the dialog.

PackageManager manager = getBaseContext().getPackageManager();
                List<ResolveInfo> infos = manager.queryIntentActivities(intent, 0);
                if (infos.size() > 0) {
                    //THE INFOS LIST HAS THE 3 APPS THAT IT SHOWS BUT MINE IS MISSING
                }else{

                }

EDIT: I figured adding screenshots might make it more clear.

This is on my Nexus 5 with 6.0.1, the list is fully expanded This is on my Nexus 5 with 6.0.1, the list is fully expanded

This is on my Nexus 4 with 5.1.1, list also fully expanded This is on my Nexus 4 with 5.1.1, list also fully expanded

Both phones have pretty much the exact same apps.

casolorz

Fixed it! All I had to do was remove <category android:name="android.intent.category.BROWSABLE"/>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Android action bar won't show up

From Dev

Camera intent doesn't show in intent chooser

From Dev

My app runs fine but the TextView won't show up

From Dev

App chooser Intent doesn't appear in android emulator

From Dev

Android - Intent.Action_Send send multiple images without showing chooser dialog multiple times

From Dev

I am creating a Browser App but Android won't detect my app in chooser while I click on any URL

From Dev

Android -- intent chooser for whatsapp and sms only

From Dev

Android Share Intent Chooser EMail Client Only

From Dev

My section won't show up

From Dev

Intent chooser can't find app to handle

From Dev

Can't make my app appear in the chooser Android BROWSABLE

From Dev

Can't make my app appear in the chooser Android BROWSABLE

From Dev

Android Intent filter does not show my app

From Dev

Android Intent filter does not show my app

From Dev

Android Action Bar won't show items

From Dev

Intent call action doesn't work on Marshmallow

From Dev

Android fragment won't show up

From Dev

My app won't show the ActionBar

From Dev

How to list my app with a different name in other apps chooser intent in Android

From Dev

How to list my app with a different name in other apps chooser intent in Android

From Dev

I don't want my app to appear on the chooser dialog when opening URL's

From Dev

Permission Dialog not Showing Up Android 6.0.1 (Marshmallow)

From Dev

Why won't my icon show up on my JButton?

From Dev

Mime type video/avc supported by multiple encoders on my Android device

From Dev

Why won't my Android SDK Manager show up when invoked from Eclipse?

From Dev

Why won't my Android SDK Manager show up when invoked from Eclipse?

From Dev

Android - Show an app chooser of all of the installed apps

From Dev

data from my database won't show up

From Dev

My image won't show up but the background color shows

Related Related

  1. 1

    Android action bar won't show up

  2. 2

    Camera intent doesn't show in intent chooser

  3. 3

    My app runs fine but the TextView won't show up

  4. 4

    App chooser Intent doesn't appear in android emulator

  5. 5

    Android - Intent.Action_Send send multiple images without showing chooser dialog multiple times

  6. 6

    I am creating a Browser App but Android won't detect my app in chooser while I click on any URL

  7. 7

    Android -- intent chooser for whatsapp and sms only

  8. 8

    Android Share Intent Chooser EMail Client Only

  9. 9

    My section won't show up

  10. 10

    Intent chooser can't find app to handle

  11. 11

    Can't make my app appear in the chooser Android BROWSABLE

  12. 12

    Can't make my app appear in the chooser Android BROWSABLE

  13. 13

    Android Intent filter does not show my app

  14. 14

    Android Intent filter does not show my app

  15. 15

    Android Action Bar won't show items

  16. 16

    Intent call action doesn't work on Marshmallow

  17. 17

    Android fragment won't show up

  18. 18

    My app won't show the ActionBar

  19. 19

    How to list my app with a different name in other apps chooser intent in Android

  20. 20

    How to list my app with a different name in other apps chooser intent in Android

  21. 21

    I don't want my app to appear on the chooser dialog when opening URL's

  22. 22

    Permission Dialog not Showing Up Android 6.0.1 (Marshmallow)

  23. 23

    Why won't my icon show up on my JButton?

  24. 24

    Mime type video/avc supported by multiple encoders on my Android device

  25. 25

    Why won't my Android SDK Manager show up when invoked from Eclipse?

  26. 26

    Why won't my Android SDK Manager show up when invoked from Eclipse?

  27. 27

    Android - Show an app chooser of all of the installed apps

  28. 28

    data from my database won't show up

  29. 29

    My image won't show up but the background color shows

HotTag

Archive