Android Multimedia (camera and Vcr)

Source: Internet
Author: User
<span id="Label3"></p><p><p>one, the application of the camera</p></p><p><p>Create Intent Object Start photo</p></p><p><p>Intent Intent = new Intent ();</p></p><p><p>Set action</p></p><p><p>Intent. Setaction (<span style="background-color:rgb(247,150,70);">mediastore.action_image_capture)</span>;</p></p><p><p>Set the path for picture saving<br>File File = new file (environment.getexternalstoragedirectory () + "/haha.png");<br>Set the name of the photo<br><span style="background-color:rgb(247,150,70);">Intent.putextra (mediastore.extra_output, uri.fromfile (file));</span><br>Start intent to take pictures<br>Startactivityforresult (intent,0);</p></p><p><p>second, the application of video recorder</p></p><p><p>     //create an Intent object <br>         intent Intent = new Intent (); <br>         //set His action <br>         <span style=" Background-color:rgb (247,150,70); ">intent.setaction (mediastore.action_video_capture); </span> <br>          <br>         //create File save path <br>         file file = new file (environment.getexternalstoragedirectory () + "/haha.mp4"); <br>         //specify file name <br>        <span style="background-color : RGB (247,150,70); "> intent.putextra (mediastore.extra_output, uri.fromfile (file)); </span> <br>         //setting video recording quality is high quality, large size <br>          Intent.putextra (mediastore.extra_video_quality, 1); <br>        Video recording of  //boot system <br> </p></p><p><p>This article is from the "android notes" blog, so be sure to keep this source http://2585211.blog.51cto.com/10044233/1672674</p></p><p><p>Android Multimedia (camera and Vcr)</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.