自动读取短信

This commit is contained in:
2026-05-31 01:22:29 +08:00
parent 557931892f
commit eea21cd33b
6 changed files with 64 additions and 112 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/node_modules/@eabdullazyanov/react-native-sms-user-consent/android/src/main/java/com/akvelon/reactnativesmsuserconsent/ReactNativeSmsUserConsentModule.java b/node_modules/@eabdullazyanov/react-native-sms-user-consent/android/src/main/java/com/akvelon/reactnativesmsuserconsent/ReactNativeSmsUserConsentModule.java
index 0000000..1111111 100644
--- a/node_modules/@eabdullazyanov/react-native-sms-user-consent/android/src/main/java/com/akvelon/reactnativesmsuserconsent/ReactNativeSmsUserConsentModule.java
+++ b/node_modules/@eabdullazyanov/react-native-sms-user-consent/android/src/main/java/com/akvelon/reactnativesmsuserconsent/ReactNativeSmsUserConsentModule.java
@@ -49,7 +49,7 @@ public class ReactNativeSmsUserConsentModule extends ReactContextBaseJavaModule
SmsRetriever.getClient(getCurrentActivity()).startSmsUserConsent(null);
broadcastReceiver = new SmsBroadcastReceiver(getCurrentActivity(), this);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
+ if (Build.VERSION.SDK_INT >= 34) {
getCurrentActivity().registerReceiver(
broadcastReceiver,
new IntentFilter(SmsRetriever.SMS_RETRIEVED_ACTION),