How can I make my app as default video player?


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 :enter image description here

I searched for that for long time,but no results,any body can help me?


First of all add intent filter to manifest

        <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"/>

Then to get video URI in you Activity:

Uri uri  getIntent().getData();

For more information check this

Answered By – user16728174

Leave a Comment