Home | History | Annotate | Download | only in com.example.android.basicpermissions

Lines Matching full:permission

36  * ({@link android.Manifest.permission#CAMERA})
38 * the permission has been granted.
40 * First, the status of the Camera permission is checked using {@link
48 * CameraPreviewActivity} if the permission has been granted.
83 // Request for camera permission.
85 // Permission has been granted. Start camera preview Activity.
86 Snackbar.make(mLayout, "Camera permission was granted. Starting preview.",
91 // Permission request was denied.
92 Snackbar.make(mLayout, "Camera permission request was denied.",
102 // Check if the Camera permission has been granted
103 if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA)
105 // Permission is already available, start camera preview
107 "Camera permission is available. Starting preview.",
111 // Permission is missing and must be requested.
118 * Requests the {@link android.Manifest.permission#CAMERA} permission.
123 // Permission has not been granted and must be requested.
125 Manifest.permission.CAMERA)) {
126 // Provide an additional rationale to the user if the permission was not granted
127 // and the user would benefit from additional context for the use of the permission.
128 // Display a SnackBar with a button to request the missing permission.
133 // Request the permission
135 new String[]{Manifest.permission.CAMERA},
142 "Permission is not available. Requesting camera permission.",
144 // Request the permission. The result will be received in onRequestPermissionResult().
145 ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA},