// Android video playback method: Add activity in androidManifest. xml ,//////// Note the resource path // when calling: // Intent intent = new Intent (MainActivity. this, PlayVideo. class); // jump from mainActivity to playvideo // this. startActivity (intent); // original package com. homer; import android. app. activity; import android. OS. bundle; import android. view. view; import android. view. view. onClickListener; import android. widget. button; import android. widget. mediaController; import android. widget. videoView; public class PlayVideo extends Activity {/** Called when the activity is first created. * // @ Overridepublic void onCreate (Bundle savedInstanceState) {super. onCreate (savedInstanceState); setContentView (R. layout. main); final VideoView videoView = (VideoView) findViewById (R. id. videoView01); videoView. setVideoPath ("android. resource: // com. homer/"+ R. raw. test); videoView. setMediaController (new MediaController (PlayVideo. this); videoView. requestFocus (); videoView. start (); Button stopButton = (Button) this. findViewById (R. id. stopButton); stopButton. setOnClickListener (new OnClickListener () {public void onClick (View arg0) {videoView. stopPlayback ();}});}}