jcore-react-native 2.0.3 → 2.0.4

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.
@@ -0,0 +1,7 @@
1
+ package cn.jiguang.plugins.push.common;
2
+
3
+ public class JConstants {
4
+
5
+ public static final String COUNTRY_CODE = "code";
6
+
7
+ }
@@ -43,6 +43,18 @@ public class JCoreModule extends ReactContextBaseJavaModule {
43
43
  public void setAuth(boolean bool){
44
44
  JCollectionAuth.setAuth(reactContext,bool);
45
45
  }
46
+ @ReactMethod
47
+ public void testCountryCode(String code){
48
+ if (readableMap == null) {
49
+ JLogger.w(JConstants.PARAMS_NULL);
50
+ return;
51
+ }
52
+ String code = readableMap.getString(JConstants.COUNTRY_CODE);
53
+ if (TextUtils.isEmpty(code)) {
54
+ } else {
55
+ JCoreInterface.testCountryCode(code);
56
+ }
57
+ }
46
58
 
47
59
 
48
60
  }
package/index.js CHANGED
@@ -10,7 +10,14 @@ const JCoreModule = NativeModules.JCoreModule
10
10
  export default class JCore {
11
11
 
12
12
  static setAuth(auth) {
13
- JCoreModule.setAuth(auth)
13
+ if (Platform.OS == "android") {
14
+ JCoreModule.setAuth(auth)
15
+ }
16
+ }
17
+ static testCountryCode(params) {
18
+ if (Platform.OS == "android") {
19
+ JCoreModule.testCountryCode(params)
20
+ }
14
21
  }
15
22
 
16
23
  }
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "author" : "wicked.tc130",
6
6
  "license" : "ISC",
7
7
  "main" : "index.js",
8
- "version" : "2.0.3",
8
+ "version" : "2.0.4",
9
9
  "repository" : {
10
10
  "type": "git",
11
11
  "url": "https://github.com/jpush/jcore-react-native"
Binary file