0

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?

GoranK
  • 1,628
  • 2
  • 12
  • 22

1 Answers1

1

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.

Bhavya
  • 161
  • 4
  • Does it really mean that Google TV devices do not have a default app for playing video?? – GoranK Feb 01 '12 at 22:08
  • Will report this to engineering team and get back to you.FYI ,you can also file google tv related bugs here at http://code.google.com/p/googletv-issues/ – Bhavya Feb 02 '12 at 00:58
  • Reply from Engineering team: Currently GoogleTV doesn't have any built-in applications that can handle these intents. Accepted as a Feature Request. – Bhavya Feb 02 '12 at 01:45
  • Do you know if it possible to play mp4 video by implementing MediaPlayer class in the app? – GoranK Feb 02 '12 at 07:17
  • MP4 is supported video format for Google TV and it should work with MediaPlayer class.You can try out the MediaPlayer Apidemos http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/media/index.html – Bhavya Feb 02 '12 at 18:20
  • Here is a basic media player with simple play controls: https://github.com/commonsguy/vidtry – Leon Nicholls Feb 21 '12 at 01:31