0

I tried the following code. But unable to play mp4 files using ACTION_VIEW. But I am able to play m4v files. How to play mp4 files.

            Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
            Uri data = Uri.parse(filePath);
            intent.setDataAndType(data, "video/*");
            startActivity(intent);

Thanks Sunil Kumar Sahoo

Bo Persson
  • 90,663
  • 31
  • 146
  • 203
Sunil Kumar Sahoo
  • 53,011
  • 55
  • 178
  • 243
  • 1
    Errors...? LogCat...? Any Force close...? anything else happening on the screen...? – SamSPICA Aug 23 '11 at 06:30
  • In any case, this post might help: [StackOverflow:Android not playing mp4 video](http://stackoverflow.com/questions/2167608/android-not-playing-video-mp4) – SamSPICA Aug 23 '11 at 06:51

1 Answers1

1

I found the issue is with streaming of video file with certain file types. http://developer.android.com/guide/appendix/media-formats.html

I found the alternate solution as to down fiel into sdcard and then play the file from SD-Card

Thanks Sunil Kumar Sahoo

Sunil Kumar Sahoo
  • 53,011
  • 55
  • 178
  • 243