简体   繁体   中英

mp4 play on Google TV emulator, but won't play on Google TV device

I use the following code to play mp4 video:

Intent i = new Intent(Intent.ACTION_VIEW);
i.setDataAndType(Uri.parse(url, "video/mp4");
ctx.startActivity(i);

It works fine on phones & tablets, as well as Google TV emulator, but throws ActivityNotFoundException on Google TV device.

Any thoughts?

When I tried to play an MP4 video using the above code snippet ,I am getting "No application can handle this action" message. Looks like there is no default application which can play the video. ActivityNotFoundException occur normally when you give the wrong media type.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM