I am using android studio and compileSdkVersion is 23 in that i am using below code
if(locationManager != null){
locationManager.removeUpdates(GPSListener.this);
}
to stop gps update where GPS Listener is a class which implements LocationListener.
but in removeUpdates line i am getting below lint warning
Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with
checkPermission
) or handle a potentialSecurityException
I am not getting what is the issue in the above code. Any extra permission need to be added in manifest file?.
Regards.