Search code examples
androidvideopopupandroid-video-player

Android open video with custom app


one of my project I was develop video player app for android.

  • when we browse video using android device file explorer and select it then usually popup a window and show the possible video player apps.

as showing red area in this image

as showing red area in this image

In my case I wanna show my video player app just like this red area apps showing. how can I do this. Is there any way to do this in programmatically in android.


Solution

  • you have to mention intent filter for your activity that plays video,so that it is visible for other apps.

    you can read more about that here Allowing Other Apps to Start Your Activity

    example:

     <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="video/*" />
            <data android:mimeType="application/sdp" />
     </intent-filter>
    

    you can also see the answer given by @Michell Bak