I have an app that requires multiple permissions to be checked and requested if not there. So when the app runs the first time, it skips all the function calls that are after it, even after clicking on allow access
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
!= PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// Check Permissions Now
ActivityCompat.requestPermissions(
this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},
REQUEST_CODE_LOCATION);
}
// Will not be called the first time
functionCall()
Is there any way to not call the function until the user hits allow access