Created
October 7, 2016 15:56
-
-
Save digitalprecision/dce876fb3a2d0c444e9f883b0d15bf35 to your computer and use it in GitHub Desktop.
k0shk0sh PermissionHelper Code Snip
This file contains 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
protected void intentCamera() | |
{ | |
/* | |
PermissionModelBuilder.withContext(this) | |
.withCanSkip(true) | |
.withTitle("Camera Permission") | |
.withPermissionName(Manifest.permission.CAMERA) | |
.withMessage("Message?") | |
.withExplanationMessage("We need camera access so you can add images to your !shouttag") | |
.withFontType("my_font.ttf") | |
//.withLayoutColorRes(R.color.blue) | |
//.withImageResourceId(R.drawable.permission_one) | |
.build(); | |
*/ | |
permissionHelper | |
.setForceAccepting(false) | |
.request(MULTI_PERMISSIONS); | |
if (permissionHelper.isPermissionGranted(Manifest.permission.CAMERA)) { | |
Log.d(LOG_TAG, "Camera perm granted"); | |
showCamera(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment