Recently, I am working on a demo for Android to use videoview to play the video file in the current project. I want to play the video and record it. The videoview control is used. If you play a network video, the video should be a progressive stream. The format should be well known, generally H.263 or H. video files with the extension 3GP or MP4 in 264 format, or 3GP files in MPEG4 sp.
Play the network videoCodeAs follows:
Videoview = (videoview) findviewbyid (R. Id. videoview );
Videoview. setvideouri (URI. parse ("http://f3.3g.56.com/15/15/JGfMspPbHtzoqpzseFTPGUsKCEqMXFTW_smooth.3gp "));
Mediacontroller = new mediacontroller (this );
Videoview. setmediacontroller (mediacontroller );
Videoview. Start ();
Playing the video files in the current project requires a little effort. Why not? Play back the SD card or mobile phone memory. Code for playing the video on the SD card:
Note: COM. telecom. activities is the class package name, R. raw. tianyi is the video file name. If the video is placed in the raw folder under Res, it is automatically stored in R. generated in Java. In Android, the file name must be a valid file name, including lower-case letters and numbers. The rest cannot be used. Note that! Fashion Java-JavaScript mogujie.com women's clothing