I've added the permission dispatcher in my application. I am using to get user location permission. It shows the alert dialog but the show location function is not called when i press on allow in alert dialog i.e request.proceed() does not call the showLocation() method. It is called when i call grant permission the second time.
Expected
it should call showLocation method to proceed further
Actual
it only only works second time when i ask for permission again
Environment
Which library version are you using?
I am using library version 4.8.0
On which devices do you observe the issue?
I ran it on simulator nexus 6 API 26 and One plus one plus one 7t android version 10
Note any other information that might be useful
Reproducible steps
I just call the permission check
SweeprFragmentPermissionsDispatcher.showLocationWithPermissionCheck(this);
which inturn calls the permission dispatcher
FAQs
@RuntimePermissions public class MyFragment extends Fragment implements ConnectivityReceiver.ConnectivityReciverListener{
Build.gradle
apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services'
android { compileSdkVersion 29 buildToolsVersion "29.0.2"
}
buildscript { repositories { google() } dependencies { classpath 'com.google.gms:google-services:4.0.0' } }
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar'])
}
Overview
I've added the permission dispatcher in my application. I am using to get user location permission. It shows the alert dialog but the show location function is not called when i press on allow in alert dialog i.e request.proceed() does not call the showLocation() method. It is called when i call grant permission the second time.
Expected
it should call showLocation method to proceed further
Actual
it only only works second time when i ask for permission again
Environment
Reproducible steps
I just call the permission check SweeprFragmentPermissionsDispatcher.showLocationWithPermissionCheck(this); which inturn calls the permission dispatcher