@sentiance-react-native/user-context 6.4.0-rc.3 → 6.5.0
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/android/src/main/java/com/sentiance/react/bridge/usercontext/SentianceUserContextModule.java
CHANGED
|
@@ -7,7 +7,9 @@ import com.facebook.react.bridge.Promise;
|
|
|
7
7
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
8
8
|
import com.facebook.react.bridge.ReactMethod;
|
|
9
9
|
import com.sentiance.react.bridge.core.base.AbstractSentianceModule;
|
|
10
|
+
import com.sentiance.react.bridge.core.common.SentianceSubscriptionsManager;
|
|
10
11
|
import com.sentiance.react.bridge.usercontext.utils.ErrorCodes;
|
|
12
|
+
import com.sentiance.sdk.Sentiance;
|
|
11
13
|
import com.sentiance.sdk.usercontext.api.RequestUserContextError;
|
|
12
14
|
import com.sentiance.sdk.usercontext.api.UserContext;
|
|
13
15
|
import com.sentiance.sdk.usercontext.api.UserContextApi;
|
|
@@ -22,7 +24,7 @@ public class SentianceUserContextModule extends AbstractSentianceModule {
|
|
|
22
24
|
UserContextUpdateListener mUserContextUpdateListener;
|
|
23
25
|
|
|
24
26
|
public SentianceUserContextModule(ReactApplicationContext reactContext) {
|
|
25
|
-
super(reactContext);
|
|
27
|
+
super(reactContext, Sentiance.getInstance(reactContext), new SentianceSubscriptionsManager());
|
|
26
28
|
emitter = new SentianceUserContextEmitter(reactContext);
|
|
27
29
|
}
|
|
28
30
|
|
|
@@ -39,7 +41,7 @@ public class SentianceUserContextModule extends AbstractSentianceModule {
|
|
|
39
41
|
return;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
UserContextApi.getInstance(
|
|
44
|
+
UserContextApi.getInstance(mReactContext)
|
|
43
45
|
.requestUserContext()
|
|
44
46
|
.addOnCompleteListener(pendingOperation -> {
|
|
45
47
|
if (pendingOperation.isSuccessful()) {
|
|
@@ -60,7 +62,7 @@ public class SentianceUserContextModule extends AbstractSentianceModule {
|
|
|
60
62
|
return;
|
|
61
63
|
}
|
|
62
64
|
|
|
63
|
-
UserContextApi userContextApi = UserContextApi.getInstance(
|
|
65
|
+
UserContextApi userContextApi = UserContextApi.getInstance(mReactContext);
|
|
64
66
|
|
|
65
67
|
if (mUserContextUpdateListener != null) {
|
|
66
68
|
userContextApi.removeUserContextUpdateListener(mUserContextUpdateListener);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentiance-react-native/user-context",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"description": "React Native Sentiance - This module provides an easy API to add user context awareness into your apps.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"sentiance"
|
|
15
15
|
],
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@sentiance-react-native/core": "6.
|
|
17
|
+
"@sentiance-react-native/core": "6.5.0"
|
|
18
18
|
},
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "",
|