Basically, when an application uses the URL of a video, my application should appear in the list, but it is not. Nor does MXPlayer appear, but the Google Photos media player as well as allcast (which had the latest release to fix this).
I wrote a quick application to test this problem, 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 problem:
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 a problem in Zephyr.
EDIT: I have to add that not all Marshmallow devices do this. It took me a long time to reproduce it the first time I heard about it, and once it just started happening on my Nexus 5. My 6P will not play it.
EDIT: I added the debug code to startActivity . Basically, I ask the package manager to give me intentional actions that can handle this intention, and I will return to the same list that I see in the dialog box.
PackageManager manager = getBaseContext().getPackageManager(); List<ResolveInfo> infos = manager.queryIntentActivities(intent, 0); if (infos.size() > 0) {
EDIT: I decided to add screenshots to make it more understandable.
This is on my Nexus 5 with 6.0.1, the list is fully extended 
This is on my Nexus 4 with 5.1.1, the list is also fully extended 
Both phones have almost the same applications.
android android-intent android-6.0-marshmallow android-intent-chooser
casolorz
source share