Home | History | Annotate | Download | only in basicpermissions

Lines Matching refs:CAMERA

28 import com.example.android.basicpermissions.camera.CameraPreviewActivity
38 * This Activity requests permissions to access the camera
39 * ([android.Manifest.permission.CAMERA])
40 * when the 'Show Camera Preview' button is clicked to start [CameraPreviewActivity] once
43 * <p>First, the status of the Camera permission is checked using [ActivityCompat.checkSelfPermission]
64 // Register a listener for the 'Show Camera Preview' button.
74 // Request for camera permission.
76 // Permission has been granted. Start camera preview Activity.
87 // Check if the Camera permission has been granted
88 if (checkSelfPermissionCompat(Manifest.permission.CAMERA) ==
90 // Permission is already available, start camera preview
100 * Requests the [android.Manifest.permission.CAMERA] permission.
106 if (shouldShowRequestPermissionRationaleCompat(Manifest.permission.CAMERA)) {
112 requestPermissionsCompat(arrayOf(Manifest.permission.CAMERA),
120 requestPermissionsCompat(arrayOf(Manifest.permission.CAMERA), PERMISSION_REQUEST_CAMERA)