I'm trying to create an activity that opens up when i click an .mp3 link in the browser.
Here's my Intent Filter :
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file" />
<data android:scheme="http" />
<data android:host="*" />
<data android:mimeType="application/mp3" />
</intent-filter>
Nothing works.
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="*"
android:pathPattern=".*.mp3"
android:scheme="http" />
</intent-filter>
It didn't work because i put : <action android:name="android.intent.action.SEND" />
inside of the intent-filter. Now i just have multiple intent-filters inside my activity.
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句