Issue
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?
Solution
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
Answered By - user16728174
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.