0
votes

I want to play .3gp video file in my android tablet. i tried below code, but it throws an error message. How can I play with default video player in android?

String movieurl = root + "/" + fileNameTextView.getText().toString();           
Intent intent = new Intent(android.content.Intent.ACTION_VIEW); 
Uri data = Uri.parse(movieurl); 
intent.setDataAndType(data,"video/3gpp"); 
startActivity(intent); 

And this is the error message:

11-15 13:47:11.060: E/AndroidRuntime(23061): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=/mnt/sdcard/DCIM/Camera/VID_20121002_174209.3gp typ=video/3gpp }

1
Could you just try video/*varevarao
I tried that. Still gives the same error message. But if I browse to the file and click on it the Gallery player starts and plays the file fine.Sean Kilb
I just found out that it works on Samsung Galaxy Tablet but doesn't work on Motorola Xoom. What could be wrong?Sean Kilb
And both of them have Android version 4.0.4Sean Kilb
The Motorola Xoom is saving video files in 3gp format, but Samsung Galaxy saves them in mp4 format. Both have the same operating system.Sean Kilb

1 Answers

5
votes

I have changed the String movieurl by adding "file:///" to the beginning:

String movieurl = "file:///" + root + "/" + fileNameTextView.getText().toString();

and that fixed the issue.