Guest User

Untitled

a guest
Jul 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. String sdcarduri = "/sdcard/3.3GP"
  2. //link your video view from layout file
  3. videoView = (VideoView)this.findViewById(R.id.videoView33);
  4.  
  5. //add controls to a MediaPlayer like play, pause.
  6. MediaController mc = new MediaController(this);
  7. videoView.setMediaController(mc);
  8.  
  9. //Set the path of Video or URI
  10. videoView.setVideoURI(Uri.parse(sdcarduri));
  11.  
  12. //Set the focus
  13. videoView.requestFocus();
  14. //auto play as the activity loads
  15. videoView.start();
Add Comment
Please, Sign In to add comment