Alex1987
Alex1987

Reputation: 9457

Android: Problem playing videos from internal storage

I'm trying to play a video file with this code:

MediaController mc = new MediaController(this);
 mc.setAnchorView(videoView);
 mc.setMediaPlayer(videoView);
 Uri video = Uri.parse(path);
 videoView.setMediaController(mc);
 videoView.setVideoURI(video);
 videoView.start();

With videos located on the SD card it works great, but when I try to play a video from the internal storage it says it's unable to play the video.

Now, I think (but not sure) it has something to do with the fact that maybe the videos in the internal storage don't have the necessary permissions.

What do you think?

Upvotes: 0

Views: 1537

Answers (1)

Chris Stratton
Chris Stratton

Reputation: 40397

Context.MODE_WORLD_WRITEABLE does not imply Context.MODE_WORLD_READABLE.

Probably you only want only readable, but you can "or" the constants together if you do want both.

Upvotes: 1

Related Questions