Android: using default video player

I have an application that plays video files.

I used the code to use Videoview and ran Videoview manually to play the video files. However, I just wanted to know if I can use the default media player or Android video player, and not create or use Videoview to play the file.

Please make comments if the question is not clear.

thanks a lot

+4
source share
1 answer

Of course - just use Intent with the Uri file.

 File file = new File("fileUri"); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(file), "video/*"); startActivity(intent); 
+9
source

All Articles