Created
July 4, 2020 00:10
-
-
Save Younes-Charfaoui/f078735b359d0ad27b88d0ceac1ffb20 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private val CAMEREA_REQUEST_ID = 1144 | |
| private fun isCameraPermissionGranted(): Boolean { | |
| return (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) | |
| == PackageManager.PERMISSION_GRANTED) | |
| } | |
| private fun requestCameraPermission() { | |
| ActivityCompat.requestPermissions( | |
| this, | |
| arrayOf(Manifest.permission.CAMERA), | |
| CAMEREA_REQUEST_ID | |
| ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment