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. Dialog not responding to fill_parent setting

How do I fix this? I'm sure most of you have had this problem. I want
my dialog box to fill the screen as I have seekbars set on fill
parent, and so it makes this tiny dialog in the middle of the screen
with tiny seekbars to go along with it. This is really irritating as I
can't find any help anywhere!

-- 

2. Activity does not load after first run?

This is a silly question... but after following the instructions and
running my application, I can't get it to run again.

I hit run, the emulator opens up, and nothing happens at startup. When
I attempt to launch the app from the applications menu, I get the old
version of the app. Breakpoints etc. don't seem to do anything.

Tried creating a new project altogether with different names for the
activity, etc. and running that, still nothing.

What did I do wrong?

-- 

3. Hello~~! I have a some question that how to get airplane mode.

4. Problems with start a Map Activity from other Activity

5. WebView and Native Browser

6. change margin of a view after it has been rendered

7. change margin of a view after it has been rendered