@readyio/react-native-wallet 0.1.46 → 0.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -415,6 +415,40 @@ Please contact Ready team to set up push notification key on server side
|
|
|
415
415
|
|
|
416
416
|
```
|
|
417
417
|
|
|
418
|
+
## Android 14 support (SDK34)
|
|
419
|
+
|
|
420
|
+
MainApplication.java
|
|
421
|
+
```java
|
|
422
|
+
// Add imports
|
|
423
|
+
import android.content.Context;
|
|
424
|
+
import android.content.BroadcastReceiver;
|
|
425
|
+
import android.content.Intent;
|
|
426
|
+
import android.content.IntentFilter;
|
|
427
|
+
import android.os.Build;
|
|
428
|
+
import org.jetbrains.annotations.Nullable;
|
|
429
|
+
|
|
430
|
+
// ...
|
|
431
|
+
|
|
432
|
+
// Put this above "public void onCreate()":
|
|
433
|
+
@Override
|
|
434
|
+
public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter) {
|
|
435
|
+
if (Build.VERSION.SDK_INT >= 34 && getApplicationInfo().targetSdkVersion >= 34) {
|
|
436
|
+
return super.registerReceiver(receiver, filter, Context.RECEIVER_EXPORTED);
|
|
437
|
+
} else {
|
|
438
|
+
return super.registerReceiver(receiver, filter);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
// ....
|
|
442
|
+
```
|
|
443
|
+
app/build.gradle
|
|
444
|
+
```
|
|
445
|
+
dependencies {
|
|
446
|
+
// ...
|
|
447
|
+
implementation 'org.jetbrains:annotations:16.0.2'
|
|
448
|
+
// ...
|
|
449
|
+
}
|
|
450
|
+
```
|
|
451
|
+
|
|
418
452
|
## Supported Versions
|
|
419
453
|
|
|
420
454
|
The library version is stable and works without issues when using React Native version 0.71.8. If you encounter any errors during the installation process, please contact the Ready Team for support.
|
|
@@ -5,6 +5,7 @@ import android.content.BroadcastReceiver;
|
|
|
5
5
|
import android.content.Context;
|
|
6
6
|
import android.content.Intent;
|
|
7
7
|
import android.content.IntentFilter;
|
|
8
|
+
import android.os.Build;
|
|
8
9
|
import android.os.Bundle;
|
|
9
10
|
|
|
10
11
|
|
|
@@ -39,6 +40,8 @@ import com.swmansion.gesturehandler.RNGestureHandlerPackage;
|
|
|
39
40
|
import com.swmansion.reanimated.ReanimatedPackage;
|
|
40
41
|
import com.th3rdwave.safeareacontext.SafeAreaContextPackage;
|
|
41
42
|
import com.walletconnect.reactnativemodule.RNWalletConnectModulePackage;
|
|
43
|
+
|
|
44
|
+
import org.jetbrains.annotations.Nullable;
|
|
42
45
|
import org.linusu.RNGetRandomValuesPackage;
|
|
43
46
|
import org.reactnative.camera.RNCameraPackage;
|
|
44
47
|
import com.reactnativecommunity.webview.RNCWebViewPackage;
|
|
@@ -63,7 +66,14 @@ public class ReadyWalletActivity extends ReactActivity implements DefaultHardwar
|
|
|
63
66
|
private static ReadyWalletActivity mInstance;
|
|
64
67
|
private ReactRootView mReactRootView;
|
|
65
68
|
private ReactInstanceManager mReactInstanceManager;
|
|
66
|
-
|
|
69
|
+
@Override
|
|
70
|
+
public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter) {
|
|
71
|
+
if (Build.VERSION.SDK_INT >= 34 && getApplicationInfo().targetSdkVersion >= 34) {
|
|
72
|
+
return super.registerReceiver(receiver, filter, Context.RECEIVER_NOT_EXPORTED);
|
|
73
|
+
} else {
|
|
74
|
+
return super.registerReceiver(receiver, filter);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
67
77
|
private BroadcastReceiver myReceiver = new BroadcastReceiver() {
|
|
68
78
|
@Override
|
|
69
79
|
public void onReceive(Context context, Intent intent) {
|
package/package.json
CHANGED