reactnative-plugin-appice 1.7.20 → 1.7.21
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/example/android/local.properties +8 -0
- package/example/package.json +1 -1
- package/example/yarn.lock +6736 -6199
- package/index.js +10 -1
- package/package.json +1 -1
- package/example/android/.gradle/7.3.3/checksums/checksums.lock +0 -0
- package/example/android/.gradle/7.3.3/fileChanges/last-build.bin +0 -0
- package/example/android/.gradle/7.3.3/fileHashes/fileHashes.lock +0 -0
- package/example/android/.gradle/vcs-1/gc.properties +0 -0
- /package/{example/android/.gradle/7.3.3/gc.properties → android/src/main/test} +0 -0
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeviceEventEmitter, NativeEventEmitter, NativeModules } from 'react-native';
|
|
2
|
-
import { Platform, Component } from 'react-native';
|
|
2
|
+
import { Platform, Component, AppState } from 'react-native';
|
|
3
3
|
// import { MMKV } from 'react-native-mmkv'
|
|
4
4
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
5
5
|
import Campaign from './campaign';
|
|
@@ -165,6 +165,15 @@ var AppICEReact = {
|
|
|
165
165
|
AppIceReactPlugin.startContext(appID, appKey, apiKey, deviceID, region, baseUrl, certs)
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
|
+
AppState.addEventListener('change', (nextAppState) => {
|
|
169
|
+
if (nextAppState === 'active') {
|
|
170
|
+
AppIceReactPlugin.isDeviceReady(true);
|
|
171
|
+
AppIceReactPlugin.registerLifeCycle();
|
|
172
|
+
} else if (nextAppState === 'background') {
|
|
173
|
+
AppIceReactPlugin.isDeviceReady(false);
|
|
174
|
+
AppIceReactPlugin.registerLifeCycle();
|
|
175
|
+
}
|
|
176
|
+
});
|
|
168
177
|
},
|
|
169
178
|
|
|
170
179
|
/**
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|