Check the system camera source, find the manifest file view
View Intent filter,action is Android.media.action.IMAGE_CAPTURE
Category is Android.intent.category.DEFAULT
Get Intent object, come out with new
Call the setaction () method of the Intent Object , set the action, parameter:android.media.action.IMAGE_ CAPTURE
Call intent setcategory ()
Call the PutExtra () method of the Intent object , pass the data, parameters:mediastore.extraoutput, value is a Uri object, by Uri.fromfile () method gets Uri object, parameter is File Object
Call the Startactivityforresult () method to open the
The picture file is saved to the file set above
Override method Onactionresult () to process the image
Using the command adb shell to enter the android system
Using the command adb pull/xx/xxx.jpg xxx.jpg, the exported file
Video
The code is the same as above, except for the action section,Android.media.action.VIDEO_CAPTURE
[Android] Call system camera and camera