We can use the code below to play the Uri of "video/mp4" by launching ACTION_VIEW Intent.
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(intentUri, "video/mp4");
startActivity(intent);
@Override
protected void onListItemClick(ListView l, View v,
int position, long id) {
// TODO Auto-generated method stub
//super.onListItemClick(l, v, position, id);
String uriString = l.getItemAtPosition(position).toString();
Uri intentUri = Uri.parse(uriString);
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(intentUri, "video/mp4");
startActivity(intent);
}
Download the files.
Thank you for reading this article Launch ACTION_VIEW Intent to play mp4 With URL http://x-tutorials.blogspot.com/2011/05/launch-actionview-intent-to-play-mp4.html. Also a time to read the other articles.
0 comments:
Write your comment for this article Launch ACTION_VIEW Intent to play mp4 above!