android - How to tag audio player for opening audio files from other apps? -


i working on music player application. when click audio file file browser, list of apps appear, can open audio file.

how make player appear on list? below code have added in manifest launching activity.

<activity  android:name="com.view.homeactivity"  android:label="@string/app_name"  android:screenorientation="portrait" >  <intent-filter>  <action android:name="android.intent.action.main" />  <category android:name="android.intent.category.launcher" />  </intent-filter>  </activity> 

i tried following code taken : how tag video player opening video files other apps?

<intent-filter>  <action android:name="android.intent.action.music_player" />  <action android:name="android.intent.category.app_music" />   <action android:name="android.intent.action.main" />  <category android:name="android.intent.category.launcher" />  <data android:mimetype="video/*" />  </intent-filter> 

thanks!

you not have use:

<data android:mimetype="video/*" /> 

you should use:

android:mimetype="audio/*" /> 

try section:

<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="http" android:pathpattern=".*mp3" android:mimetype="audio/*" /> </intent-filter> 

Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -