0

I created an App for Playing MP3. Now I want to open my app from other apps like file explorer. When the user clicks on any mp3 file it must show my app in "Complete action Using" like this:

Complete action using:

[my app]

[other app 1]

[other app 2]

...

When my app is selected, I want it to play the mp3 file (it should get the path to it somehow?).

How do I do this?

Example here...

sprite
  • 3,724
  • 3
  • 28
  • 30
Rohit Kumar
  • 71
  • 1
  • 6

1 Answers1

1

You need to simply add an intent filter

add this:

<intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="content"/>
        <data android:scheme="file"/>
        <data android:mimeType="audio/*"/>
    </intent-filter>
harveyslash
  • 5,906
  • 12
  • 58
  • 111