react-native-sms-retriever
react-native-sms-retriever copied to clipboard
App crashing issue on Android 12
Environment
- React Native Version : 0.63.4
- Platform: Android
- Device: All android 12 devices
- OS Version : Android 12 Latest
- react-native-sms-retriever version : 1.1.1
- Devtools: Android Studio Version : Bumblebee 2021.1.1
- Build Tools Version
Description
When the Pop up triggers with mobile number it shows error like this
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_IMMUTABLE be specified when creating a Pendingintent. Strongly consider using FLAG_IMMUTABLE, only use FLAG MUTABLE if some functionality depends on the Pendingintent being mutable, e.g. if it needs to be used with inline replies or bubbles.
Working Fine on Android 11 (SDK 30) not working on Android 12 (SDK 31).
Image :
Kindly make a solution ASAP.
@sanjaygsk what have you done here? Have you found another solution?
I found that this is caused by a bug in the Google play-services-base
/play-services-basement
packages (ref link). Setting this in app/build.gradle
has prevented this error from appearing again so far (can be any version greater than 18.0.0):
implementation 'com.google.android.gms:play-services-base:18.1.0'
implementation 'com.google.android.gms:play-services-basement:18.1.0'
Application crashing on Android 12 Samsung M215F too. Application closed and app crashed.
I found that this is caused by a bug in the Google
play-services-base
/play-services-basement
packages (ref link). Setting this inapp/build.gradle
has prevented this error from appearing again so far (can be any version greater than 18.0.0):implementation 'com.google.android.gms:play-services-base:18.1.0' implementation 'com.google.android.gms:play-services-basement:18.1.0'
@ruibinch Did you add this in package's app/build.gradle
or your project's app/build.gradle
?
@rizshivalli own project's app/build.gradle
Fixed this on mine by bumping up the dependancies.
implementation 'com.google.android.gms:play-services-auth:20.3.0'
implementation 'com.google.android.gms:play-services-auth-api-phone:18.0.1'