on Android, I check if the location is enabled with
LocationManager.isProviderEnabled(GPS_PROVIDER) || LocationManager.isProviderEnabled(NETWORK_PROVIDER)
This work fine, however on marshmallow (and upper) when a user go in the app settings and deny only for my app the permissions to use the location (just for my app, like mashmallow now permit to do) then the previous request still return true
I try also :
MyActivity.checkSelfPermission('android.permission.ACCESS_FINE_LOCATION') == PERMISSION_GRANTED or MyActivity.checkSelfPermission('android.permission.ACCESS_COARSE_LOCATION') == PERMISSION_GRANTED
But it's always return true even when the user deny the permission to my app