Try what I did
Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse("http://www.yourvideo.mp4"), "video/mp4");
Then add permission: android.permission.WRITE_EXTERNAL_STORAGE to manifest.
Update
Firstly, videos can have problems, as not all videos are safe for streaming .
Secondly, not all devices can have actions configured to support ACTION_VIEW on video/mp4 files that are streamed. You should use PackageManager and queryIntentActivities() to confirm whether the startActivity() call will find a match or startActivity() ActivityNotFoundException that you get.
You need to check the Android Encoding Recommendation . Make sure your video is encoded with supported code and your video matches the permissions. After the video was correctly encoded, the work with the stream worked.
Also, if you have not noticed yet, as a rule, the emulator does not play them, and you will need to test on a real device.
source share