Closed ezha86 closed 7 years ago
Is adding the following line to your manifest not enough? Tested fine for android 5 over here...
<uses-permission android:name="android.permission.CALL_PHONE" />
Does anyone know if rights can also be added automatically?
it works with android version 5 and lower starting from version 6 android called some of permissions "sensitive" and setting permission in AndroidManifest file stoped working. you must use react native PermissionsAndroid - http://facebook.github.io/react-native/releases/next/docs/permissionsandroid.html
Ran in to this issue tonight, would this be worth adding to the README?
Yes, if I find some time I will test it and add a fix or workaround to the readme...
I'm having this issue, any update ?
Not sure if its same as I faced. But in node_modules/react-native-immediate-phone-call/android/build.gradle we have the following configuration:
`android { compileSdkVersion 23 buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 16
targetSdkVersion 22
versionCode 2
versionName "1.1"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
lintOptions {
warning 'InvalidPackage'
}
}`
instead we can use latest configuration which lets user define the necessary sdk versions and build tools version on app level build.gradle and use the same for internal purpose provided by RN 0.57.8 ie. as following
` android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 2
versionName "1.1"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
lintOptions {
warning 'InvalidPackage'
}
} ` Image for better understanding.
This did solve my problem while having error during build.
Attaching image of error for reference so that if anyone gets similar one they can fix it.
@wumke Also I was thinking if we can give this setting of configuration by default?
@kailashvele This has nothing to do with the change of rights to sensitive rights which require special request popup in newer android versions. You have a good point in making this the standard setting for SDK versions (for other packages I use in my apps I also changed these values manually to my project settings, I've not checked if they are already switched to the config you suggest).
@wumke
This has nothing to do with the change of rights to sensitive rights which require special request popup in newer android versions.
Yes I just mentioned here because I didn't wanted to raise another issue and thought this might be close to it.
You have a good point in making this the standard setting for SDK versions (for other packages I use in my apps I also changed these values manually to my project settings, I've not checked if they are already switched to the config you suggest).
Other packages that I use, I didn't had to do any manual setting it works fine. Just had to do for this package. You can evaluate it if you want to standardise it as you know the package more so you can give the best suggestion. :)
hi, thanks for the module. IOS works fine as well as android 5( < 23 sdk) but with if you try to do call at android sdk 23 and higher it causes error
its cus you must request for CALL_PHONE permission while the app is running. how can i handle this ? Thanks!