
I've looked for existing potential solutions with other formats and those still responds with mentioned error.
Finally, recorded the video with the same device and used it as a resource for this app and it still doesn't work.
Devices: SGS2, lenovo a820
Video type: MPEG-4 video (video/mp4)
    videoView = (VideoView)findViewById(R.id.videoView);
    videoView.setVideoPath("android.resource://raw/sample.mp4");
    videoView.start();
Please refer below code snippet...problem was with the path declaration..
 String uriPath = "android.resource://"+getPackageName()+"/"+R.raw.aha_hands_only_cpr_english;
        Uri uri = Uri.parse(uriPath);
        mVideoView.setVideoURI(uri);
Thats it...
I tried everything mentioned before but it turns out that internet permission is needed to play a mp4 file.
<uses-permission android:name="android.permission.INTERNET" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With