Skip to content

Commit

Permalink
Move the request for notification pemissions to a different flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM committed May 28, 2024
1 parent 2c1f939 commit 40da6bc
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public class BackgroundGeolocationFacade {
public static final String[] PERMISSIONS = {
Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.POST_NOTIFICATIONS,
};

private boolean mServiceBroadcastReceiverRegistered = false;
Expand Down Expand Up @@ -235,6 +234,13 @@ public void onPermissionDenied(DeniedPermissions deniedPermissions) {
}
}
});
permissionManager.checkPermissions(Arrays.asList(Manifest.permission.POST_NOTIFICATIONS), new PermissionManager.PermissionRequestListener() {
@Override
public void onPermissionGranted() {} // noop

@Override
public void onPermissionDenied(DeniedPermissions deniedPermissions) {} // noop
});
}

public void stop() {
Expand Down

0 comments on commit 40da6bc

Please sign in to comment.