I am playing videos in my app, video should play portrait and landscape mode withought restarting actvity, please any can give examples are links.
using video view for playing video.
public class PlayVideoActivity extends Activity { private VideoView video; private ImageButton back; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); back = (ImageButton)findViewById(R.id.backbutton); back.setOnClickListener(new View.OnClickListener() { public void onClick(View arg0) { finish(); } }); video=(VideoView)findViewById(R.id.videoView); video.setDrawingCacheEnabled(true); video.setDrawingCacheQuality(VideoView.DRAWING_CACHE_QUALITY_HIGH); video.setVideoURI(Uri.parse("android.resource://"+ getPackageName() +"/" + R.raw.fillings_class_1)); video.requestFocus(); video.setMediaController(new MediaController(this)); video.start(); } @Override public void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); //restore the relevant information } }