I am building a video player and I want to make my app to be shown when someone want to play a video, like this :
I searched for that for long time,but no results,any body can help me?
First of all add intent filter to manifest
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="video/*"/>
<data android:scheme="content"/>
<data android:scheme="file"/>
</intent-filter>
Then to get video URI in you Activity:
Uri uri = getIntent().getData();
For more information check this