The Android implementation calls the camera
- 2020-06-23 01:58:08
- OfStack
Application scenario: During the development of Android, it is sometimes necessary to call the function of the phone's own device. This paper focuses on the call of the camera's function of taking photos. Permission: To call the device function of the phone (camera camera function), make sure that the use of the camera and other related feature have been correctly stated in ES2en.xml
1. Camera related permission Settings
<!-- Camera access -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- Store permissions SD Card read-Write permission -->
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!--Camera Feature The statement of camera feature The use of -->
<uses-feature android:name="android.hardware.camera" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<!-- Video and recording permissions Request audio capture permission -->
<uses-permission android:name="android.permission.RECORD_VIDEO"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
This is the end of this article, I hope you enjoy it.