I\'m trying to use ExoPlayer instead of MediaPlayer because it\'s a common bug that MediaPlayer returns wrong getCurrentPosition() and I need a substitute.
But I can\'t
A minor modification with Srikanth Peddibhotla's code works
The Uri string for the file should be "file:///mnt/sdcard/YourFilename.mp4" instead of "/mnt/sdcard/YourFilename.mp4" in Samples.java
public static final Sample[] LOCAL_VIDEOS = new Sample[] {
new Sample("Some User friendly name of video 1",
"file:///mnt/sdcard/video1.mp4", DemoUtil.TYPE_MP4),
new Sample("Some User friendly name of video 2",
"file:///mnt/sdcard/video2.mp4", DemoUtil.TYPE_MP4),
};
Also, add the following lines to SampleChooserActivity.java
sampleAdapter.add(new Header("Local Videos"));
sampleAdapter.addAll((Object[]) Samples.LOCAL_VIDEOS);