react-native-sms-retriever icon indicating copy to clipboard operation
react-native-sms-retriever copied to clipboard

App crashing issue on Android 12

Open sanjaygsk opened this issue 2 years ago • 6 comments

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 :

SMS retriever issue

Kindly make a solution ASAP.

sanjaygsk avatar Jun 01 '22 09:06 sanjaygsk

@sanjaygsk what have you done here? Have you found another solution?

RRaideRR avatar Aug 09 '22 13:08 RRaideRR

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'

ruibinch avatar Aug 10 '22 03:08 ruibinch

Application crashing on Android 12 Samsung M215F too. Application closed and app crashed.

SanjanaTailor avatar Aug 29 '22 10:08 SanjanaTailor

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'

@ruibinch Did you add this in package's app/build.gradle or your project's app/build.gradle?

rizshivalli avatar Sep 12 '22 15:09 rizshivalli

@rizshivalli own project's app/build.gradle

ruibinch avatar Sep 13 '22 00:09 ruibinch

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'

jgkiano avatar Oct 26 '22 15:10 jgkiano