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


basically when app shares video url app supposed show on list doesn't. neither mxplayer google photos media player shows fine allcast (which had recent release fix this).

i wrote quick app test issue, here 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 code reproduce 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 issue on marshmallow.

edit: should add not marshmallow devices this. took me long time reproduce first time heard , 1 day started happening on nexus 5. 6p won't reproduce this.

edit: added debugging code prior startactivity. i'm asking package manager give me intent activities can handle intent , exact same list see on dialog.

packagemanager manager = getbasecontext().getpackagemanager();                 list<resolveinfo> infos = manager.queryintentactivities(intent, 0);                 if (infos.size() > 0) {                     //the infos list has 3 apps shows mine missing                 }else{                  } 

edit: figured adding screenshots might make more clear.

this on nexus 5 6.0.1, list expanded this on nexus 5 6.0.1, list expanded

this on nexus 4 5.1.1, list expanded this on nexus 4 5.1.1, list expanded

both phones have pretty exact same apps.

fixed it! had remove <category android:name="android.intent.category.browsable"/>


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -