Skip to content

Instantly share code, notes, and snippets.

😈
Working @ Office

Mian Sarim Hameed MianSarimHameed

😈
Working @ Office
Block or report user

Report or block MianSarimHameed

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View RuntimePermissionsHelper.java
private void getPermission() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (ContextCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_FINE_LOCATION)
!= PackageManager.PERMISSION_GRANTED) {
// Permission is not granted
if (ActivityCompat.shouldShowRequestPermissionRationale(this,
Manifest.permission.ACCESS_FINE_LOCATION)) {
You can’t perform that action at this time.