Try this code... This code woks for me......
package mypack.mydemos;
import android.app.Activity;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;
public class demo extends Activity {
/** Called when the activity is first created. */
private VideoView myVideo,myVideo1;
private MediaController mc,mc1;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
getWindow().setFormat(PixelFormat.TRANSLUCENT);
setContentView(R.layout.main);
myVideo1=(VideoView)findViewById(R.id.video);
myVideo1.setVideoPath("/sdcard/nithin.mp4");
myVideo1.start();
mc1=new MediaController(this);
mc1.setMediaPlayer(myVideo1);
myVideo1.setMediaController(mc1);
//mc.show(RESULT_OK);
myVideo1.requestFocus();
}
}
Thsnk You
Nithin N V
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---