Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nethical6 committed Jul 14, 2024
1 parent 7dc4b68 commit 57396f7
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ public void onLocationChanged(Location location) {
startQuest.setOnClickListener(
v -> {
if (!isRunning) {

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
checkBgLocation();
return;
}

SharedPreferences.Editor editor = questPref.edit();
editor.putString(
DigiConstants.PREF_QUEST_ID_KEY,
Expand Down Expand Up @@ -399,23 +403,16 @@ public void onRequestPermissionsResult(
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (requestCode == REQUEST_FINE_LOCATION_PERMISSION) {
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
checkBgLocation();
}
checkNotificationPermision();
// Permission granted for ACCESS_FINE_LOCATION
// makeRadar();
}else {
checkLocationPermission();
}
} else if (requestCode == REQUEST_POST_NOTIFICATIONS_PERMISSION) {
loadingDialog.show(
getActivity().getSupportFragmentManager(),
"loading_dialog"); // Use a unique tag for the dialog
makeRadar();
} else if (requestCode == REQUEST_BG_LOC_PERMISSION){
checkNotificationPermision();
}
}
}

private BroadcastReceiver locUpdateReceiver =
Expand Down

0 comments on commit 57396f7

Please sign in to comment.