[android-developers] Re: Play Video Files in Android
Sorry, but using this way you will be able to play only audio stream from mp4 file. To have some video displayed on the screen you need to use setDisplay method of Media Player. I can't get it working on emulator. Have anyone any success with this yet? On 4 дек 2008, 07:41, brian arxhu...@gmail.com wrote: Do this: MediaPlayer mp = new MediaPlayer(); mp.setDataSource(PATH_TO_FILE); mp.prepare(); mp.start(); Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Play Video Files in Android
public void onCreate(Bundle icicle) { super.onCreate(icicle); getWindow().setFormat(PixelFormat.TRANSLUCENT); videoHolder = new VideoView(this); videoHolder.setMediaController(new MediaController(this)); setContentView(videoHolder); // i tested and found that it works fine for .wmv, .3gp and .mp4 // videoHolder.setVideoURI(Uri.parse(file:///sdcard/video.3gp)); videoHolder.setVideoURI(Uri.parse(file:///sdcard/video.mp4)); videoHolder.requestFocus(); videoHolder.start(); } NJoy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Play Video Files in Android
Forgot to mention that I tried it on emulator but it didn't helped but on device it works fine. I had to push my video file to sdcard. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Play Video Files in Android
Dear Jatin , if you just want to play a video on android emulator these are the steps go to this location /development/samples/ApiDemos/src/com/example/android/apis/media/ Edit MediaPlayerDemo_Video.java path = /sdcard/Yourfilename; //add your file name here Save and quit run make command . This will buiild out/target/product/generic/data/app/ApiDemos.apk Now do adb install out/target/product/generic/data/app/ApiDemos.apk Now place the videofile (Yourfilename) in /sdcard like this adb push Yourfilename /sdcard Go to apidemos -media- mediaplayer - play video from local file This should start playing the video which u place in the /sdcard. Please let me know if you have any other question Regards Girish On Dec 4, 1:56 am, Dave Sparks [EMAIL PROTECTED] wrote: If you want a video player app for your G1, there are several available for free in the Market. If you are looking for sample code, check out the SDK sample code. There are also several workable snippets posted in various messages on this list. On Dec 3, 9:19 pm, Jatin [EMAIL PROTECTED] wrote: Hello, Please let me know how to play the Video Files in the Media Palyer of the Android. I have push the .mp4 file inside the SD Card. Jatin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Play Video Files in Android
Do this: MediaPlayer mp = new MediaPlayer(); mp.setDataSource(PATH_TO_FILE); mp.prepare(); mp.start(); Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Play Video Files in Android
If you want a video player app for your G1, there are several available for free in the Market. If you are looking for sample code, check out the SDK sample code. There are also several workable snippets posted in various messages on this list. On Dec 3, 9:19 pm, Jatin [EMAIL PROTECTED] wrote: Hello, Please let me know how to play the Video Files in the Media Palyer of the Android. I have push the .mp4 file inside the SD Card. Jatin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---