System.gc(); Intent i = getIntent(); Bundle extras = i.getExtras(); filename = extras.getString("videofilename"); if(null!=filename) { Uri uri=Uri.parse(filename); videoPlayer = (VideoView)this.findViewById(R.id.videoView); videoPlayer.setOnCompletionListener(this); videoPlayer.setKeepScreenOn(true); //videoPlayer.setVideoPath(filename); videoPlayer.setVideoURI(uri); videoPlayer.setMediaController(new MediaController(this)); videoPlayer.requestFocus(); videoPlayer.start(); } else { Toast.makeText(this, "Error", 100).show(); finish(); }
videofilename
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)