Does anyone know of an intention that I can use to open the mp4 source resource in a phone player? I tried this code:
Uri video = Uri.parse( "android.resource://" + getPackageName() + "/" + R.raw.video );
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(video, "video/*");
startActivity(intent);
This threw an ActivityNotFoundException, however it worked for me when the URI was an SD card and the video was there. Does anyone know how I can use the above code with a resource file in my application?
source
share