I'm developing an app for the Archos 5 Internet Tablet. (With Android 1.6)
I want to start a video in a VideoView within my app. On my Android emulator the following code works fine but on my Archos 5 I always get an error:
Cannot play video
Sorry, this video cannot be played.
//get current window information, and set format, set it up differently, if you need some special effects
getWindow().setFormat(PixelFormat.TRANSLUCENT);
//the VideoView will hold the video
VideoView videoHolder = (VideoView) findViewById(R.id.VideoView01);
//MediaController is the ui control hovering above the video (just like in the default youtube player).
videoHolder.setMediaController(new MediaController(this));
//assing a video file to the video holder
videoHolder.setVideoURI(Uri.parse("android.resource://mypackage/" + R.raw.testmovie));
//get focus, before playing the video.
videoHolder.requestFocus();
if(autoplay){
videoHolder.start();
}
Is there a way to run a VideoView on a archos 5?
I also tried to play the movie with the archos player. With the following code I get the error: "Cannot find the media file!".
String ACTION_LAUNCH_AVOS = "android.intent.action.LAUNCH_AVOS";
String avosCommand = "ACTION:video_play,url=videoentries:Video/testmovie.wmv,etype=resume";
final Intent startAvos = new Intent(ACTION_LAUNCH_AVOS,Uri.parse(avosCommand));
startAvos.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK );
startActivity(startAvos);
I put the video in the Video folder of the Archos. The video runs when I open it with the file browser.
I always get the error "Cannot find the media file!", no matter what url I use.
Is there a certain folder where I have to put the video so that it can be found? And how do I get the url to that certain folder?
It would be great if you could help me!
Thanks and BR, Thomas