Hey! First of all thanks for making this module. I just wanted to let you know that I was testing it on android 23 API. I removed permission for geolocation on my device but my app still says authorized when I check for location permission with Permissions.check('location'). I even then turned off geolocation just to check if this library would check that instead of the actual permission but it still says authorized. Wondering if I'm doing wrong or the library doesn't support the version of android I'm using.
Same issue, testing on Android 6.0.1 api 23
"react-native-permissions": "^1.0.1"
Permissions.check('camera')
Found the issue. In build.gradle I was using targetSdkVersion 22, needs to be 23.
android {
compileSdkVersion 23 <-- use 23
buildToolsVersion "23.0.1" <-- use 23
defaultConfig {
applicationId "xx.yy.zz"
minSdkVersion 16
targetSdkVersion 23 <-- use 23
versionCode 49
versionName "2.1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
@fbacker Yes. I will add it to the README.md
EDIT: Done!
i am still getting with targetSdkVersion 23 as authorized why??
Same here still getting always authorized with targetSdkVersion 23. @TheCodeTalker did you get any solution?
i think i went native side to to give me bool value for auth or not (by bridge)
some thing like this @ReactMethod
public void isLocationEnabled(Promise promise) {
if (lm != null) {
promise.resolve(lm.isProviderEnabled(LocationManager.GPS_PROVIDER)
|| lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER));
} else {
promise.reject("-1", "get location manager fail");
}
}
Most helpful comment
Found the issue. In build.gradle I was using targetSdkVersion 22, needs to be 23.