I'm trying to display an mp4 video from the app resources inside a VideoView
, referring to this answer and this tutorial I used the following way:
// make the videoView visible
storyVideo.setVisibility(View.VISIBLE);
// set Video Preferences
storyVideo.requestFocus();
storyVideo.setBackgroundColor(Color.BLACK);
// get & set the video URI
Uri uri = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.story_media4);
storyVideo.setVideoURI(uri);
// Start The Video
storyVideo.start();
where story_media4 is stored in the raw file in resources: