play video

by Nithin » Sat, 04 Apr 2009 13:16:01 GMT


Sponsored Links
 Hi.. to all

               Can anyone tell me that how to run video file in
android emulator. I am using windows flat form. It is possible to run
video file in android emulator using  windows flat form... If possible
please tell me how to run...


Thank You
Nithin N V


--~--~---------~--~----~------------~-------~--~----~



play video

by Nithin » Sat, 11 Apr 2009 11:56:41 GMT


 Hi to all

           I tried to play the video through sdcard image... But i got
a error like
"Cannot play the video".. Can anyone tell me what is the error in my
code...


public class SimpleVideo extends Activity {
        private VideoView myVideo;
        private MediaController mc;
        @Override
        public void onCreate(Bundle icicle) {
                super.onCreate(icicle);
                getWindow().setFormat(PixelFormat.TRANSLUCENT);
                setContentView(R.layout.main);
                Button bPlayVideo=(Button)findViewById(R.id.playvideo);
                bPlayVideo.setOnClickListener(new View.OnClickListener() {
                public void onClick(View view) {
                        mc.show();      }
                                });
                        myVideo=(VideoView)findViewById(R.id.video);
                        myVideo.setVideoPath("/sdcard/test.mp4");
                        mc=new MediaController(this);
                        mc.setMediaPlayer(myVideo);
                        myVideo.setMediaController(mc);
                        myVideo.requestFocus();
                }
}



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


play video

by Mark Murphy » Sat, 11 Apr 2009 21:09:45 GMT


 


It may be the video file you have is not compatible with Android.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Fwd: RTP socket creation

Hi,

Could anybody please tell me where the RTP socket will be created to
receive streaming media and how it will be given to the jitter
buffer ?

Thanks and Regards,

--~--~---------~--~----~------------~-------~--~----~

2. Having trouble getting ListView to show selected item as highlighted

How to get the position of an item that is focused in a listview by
scrolling up or down using the up/down keys?

Also, what is the difference between onClick and onItemSelected? i.e.
when is each one called??

Thanks.







--~--~---------~--~----~------------~-------~--~----~

3. Android application, with native code

4. Best way to learn android development?

5. Developer Phone Build Version and Upgrade

6. Saving Files

7. RES: Activating dev phone with AT&T sim card?