@grouplinknetwork/rn-grouplink-sdk 1.2.2 → 1.3.2
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 +1 -23
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/grouplinksdk/GrouplinkSdkModule.java +13 -0
- package/lib/commonjs/index.js +13 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +11 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/package.json +3 -2
- package/src/index.tsx +14 -0
- package/android/.gradle/7.4.2/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.4.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.4.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.4.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/libs/lib-grouplink-debug_v3_14_1.aar +0 -0
- package/android/libs/lib-grouplink-release_v3_14_1.aar +0 -0
package/README.md
CHANGED
|
@@ -3,27 +3,5 @@ Group Link SDK for Android and iOS Devices
|
|
|
3
3
|
## Installation
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
npm install grouplink-sdk
|
|
6
|
+
npm install @grouplinknetwork/rn-grouplink-sdk
|
|
7
7
|
```
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```js
|
|
12
|
-
import { multiply } from "grouplink-sdk";
|
|
13
|
-
|
|
14
|
-
// ...
|
|
15
|
-
|
|
16
|
-
const result = await multiply(3, 7);
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Contributing
|
|
20
|
-
|
|
21
|
-
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
|
|
22
|
-
|
|
23
|
-
## License
|
|
24
|
-
|
|
25
|
-
MIT
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
|
package/android/build.gradle
CHANGED
|
@@ -137,7 +137,7 @@ dependencies {
|
|
|
137
137
|
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.2'
|
|
138
138
|
implementation 'androidx.navigation:navigation-ui-ktx:2.3.2'
|
|
139
139
|
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
|
|
140
|
-
implementation 'com.grouplinknetwork:lib-grouplinknetwork:3.
|
|
140
|
+
implementation 'com.grouplinknetwork:lib-grouplinknetwork:3.24.13'
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
if (isNewArchitectureEnabled()) {
|
|
@@ -19,6 +19,7 @@ import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
|
19
19
|
import com.facebook.react.module.annotations.ReactModule;
|
|
20
20
|
import android.os.Handler;
|
|
21
21
|
import android.os.Looper;
|
|
22
|
+
import com.grouplinknetwork.GrouplinkUserIdListener;
|
|
22
23
|
|
|
23
24
|
import com.grouplinknetwork.GroupLink;
|
|
24
25
|
|
|
@@ -44,6 +45,18 @@ public class GrouplinkSdkModule extends ReactContextBaseJavaModule implements Li
|
|
|
44
45
|
return NAME;
|
|
45
46
|
}
|
|
46
47
|
|
|
48
|
+
@ReactMethod
|
|
49
|
+
public void getUserIdAndroid(Callback callback){
|
|
50
|
+
Context context = mReactApplicationContext.getApplicationContext();
|
|
51
|
+
String userId = "undefined usrId";
|
|
52
|
+
try{
|
|
53
|
+
userId = GroupLink.getUserId(context);
|
|
54
|
+
callback.invoke(""+userId);
|
|
55
|
+
}catch(Exception e){
|
|
56
|
+
e.printStackTrace();
|
|
57
|
+
callback.invoke("not registered");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
47
60
|
|
|
48
61
|
// Example method
|
|
49
62
|
// See https://reactnative.dev/docs/native-modules-android
|
package/lib/commonjs/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.getUserId = getUserId;
|
|
6
7
|
exports.setDevicePushTokenIOS = setDevicePushTokenIOS;
|
|
7
8
|
exports.setFirebaseToken = setFirebaseToken;
|
|
8
9
|
exports.startBluetoothIOS = startBluetoothIOS;
|
|
@@ -32,6 +33,14 @@ function startGrouplink(token, debbugable) {
|
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
function getUserId(success) {
|
|
37
|
+
if (isAndroid()) {
|
|
38
|
+
getUserIdAndroid(success);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (isiOS()) {}
|
|
42
|
+
}
|
|
43
|
+
|
|
35
44
|
function setFirebaseToken(token) {
|
|
36
45
|
if (isAndroid()) {
|
|
37
46
|
console.log("Android: setting firebase token");
|
|
@@ -78,4 +87,8 @@ function startIOS(withToken) {
|
|
|
78
87
|
console.log('Group Link SDK (iOS) - Start with token: ', withToken);
|
|
79
88
|
return RNGroupLinkSDK.startIOS(withToken);
|
|
80
89
|
}
|
|
90
|
+
|
|
91
|
+
function getUserIdAndroid(success) {
|
|
92
|
+
RNGroupLinkSDK.getUserIdAndroid(success);
|
|
93
|
+
}
|
|
81
94
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LINKING_ERROR","Platform","select","ios","default","RNGroupLinkSDK","NativeModules","Proxy","get","Error","startGrouplink","token","debbugable","isAndroid","startAndroid","isiOS","startIOS","setFirebaseToken","console","log","startBluetoothIOS","setDevicePushTokenIOS","setDevicePushToken","startLocationIOS","OS","withToken"],"sources":["index.tsx"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\n\nconst LINKING_ERROR =\n `The package 'grouplink-sdk' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nconst RNGroupLinkSDK = NativeModules.RNGroupLinkSDK\n ? NativeModules.RNGroupLinkSDK\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport function startGrouplink(token: string, debbugable: boolean) {\n if (isAndroid()) {\n startAndroid(token, debbugable);\n }\n if (isiOS()) {\n startIOS(token);\n }\n}\n\nexport function setFirebaseToken(token: string){\n if(isAndroid()){\n console.log(\"Android: setting firebase token\")\n RNGroupLinkSDK.setFirebaseToken(token);\n }\n}\n\nexport function startBluetoothIOS() {\n if (isiOS()) {\n console.log('Group Link SDK (iOS) - Start Bluetooth Stack');\n return RNGroupLinkSDK.startBluetoothIOS();\n }\n return;\n}\n\nexport function setDevicePushTokenIOS(token: string) {\n return RNGroupLinkSDK.setDevicePushToken(token)\n}\n\nexport function startLocationIOS() {\n if (isiOS()) {\n console.log('Group Link SDK (iOS) - Start Location Stack');\n return RNGroupLinkSDK.startLocationIOS();\n }\n return;\n}\n\nfunction isAndroid() {\n return Platform.OS == 'android';\n}\n\nfunction isiOS() {\n return Platform.OS == 'ios';\n}\n\nfunction startAndroid(withToken: string, debbugable: boolean) {\n console.log('Group Link SDK (Android) - Start with token: ', withToken);\n return RNGroupLinkSDK.startAndroid(withToken, debbugable);\n}\n\nfunction startIOS(withToken: string) {\n console.log('Group Link SDK (iOS) - Start with token: ', withToken);\n return RNGroupLinkSDK.startIOS(withToken);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["LINKING_ERROR","Platform","select","ios","default","RNGroupLinkSDK","NativeModules","Proxy","get","Error","startGrouplink","token","debbugable","isAndroid","startAndroid","isiOS","startIOS","getUserId","success","getUserIdAndroid","setFirebaseToken","console","log","startBluetoothIOS","setDevicePushTokenIOS","setDevicePushToken","startLocationIOS","OS","withToken"],"sources":["index.tsx"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\n\nconst LINKING_ERROR =\n `The package 'grouplink-sdk' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nconst RNGroupLinkSDK = NativeModules.RNGroupLinkSDK\n ? NativeModules.RNGroupLinkSDK\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport function startGrouplink(token: string, debbugable: boolean) {\n if (isAndroid()) {\n startAndroid(token, debbugable);\n }\n if (isiOS()) {\n startIOS(token);\n }\n}\n\nexport function getUserId(success: (userId:string)=>void) {\n if (isAndroid()) {\n getUserIdAndroid(success)\n }\n if (isiOS()) {\n \n }\n}\n\nexport function setFirebaseToken(token: string){\n if(isAndroid()){\n console.log(\"Android: setting firebase token\")\n RNGroupLinkSDK.setFirebaseToken(token);\n }\n}\n\nexport function startBluetoothIOS() {\n if (isiOS()) {\n console.log('Group Link SDK (iOS) - Start Bluetooth Stack');\n return RNGroupLinkSDK.startBluetoothIOS();\n }\n return;\n}\n\nexport function setDevicePushTokenIOS(token: string) {\n return RNGroupLinkSDK.setDevicePushToken(token)\n}\n\nexport function startLocationIOS() {\n if (isiOS()) {\n console.log('Group Link SDK (iOS) - Start Location Stack');\n return RNGroupLinkSDK.startLocationIOS();\n }\n return;\n}\n\nfunction isAndroid() {\n return Platform.OS == 'android';\n}\n\nfunction isiOS() {\n return Platform.OS == 'ios';\n}\n\nfunction startAndroid(withToken: string, debbugable: boolean) {\n console.log('Group Link SDK (Android) - Start with token: ', withToken);\n return RNGroupLinkSDK.startAndroid(withToken, debbugable);\n}\n\nfunction startIOS(withToken: string) {\n console.log('Group Link SDK (iOS) - Start with token: ', withToken);\n return RNGroupLinkSDK.startIOS(with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AAf,CAAkCd,KAAlC,CAAP;AACD;;AAEM,SAASe,gBAAT,GAA4B;EACjC,IAAIX,KAAK,EAAT,EAAa;IACXM,OAAO,CAACC,GAAR,CAAY,6CAAZ;IACA,OAAOjB,cAAc,CAACqB,gBAAf,EAAP;EACD;;EACD;AACD;;AAED,SAASb,SAAT,GAAqB;EACnB,OAAOZ,qBAAA,CAAS0B,EAAT,IAAe,SAAtB;AACD;;AAED,SAASZ,KAAT,GAAiB;EACf,OAAOd,qBAAA,CAAS0B,EAAT,IAAe,KAAtB;AACD;;AAED,SAASb,YAAT,CAAsBc,SAAtB,EAAyChB,UAAzC,EAA8D;EAC5DS,OAAO,CAACC,GAAR,CAAY,+CAAZ,EAA6DM,SAA7D;EACA,OAAOvB,cAAc,CAACS,YAAf,CAA4Bc,SAA5B,EAAuChB,UAAvC,CAAP;AACD;;AAED,SAASI,QAAT,CAAkBY,SAAlB,EAAqC;EACnCP,OAAO,CAACC,GAAR,CAAY,2CAAZ,EAAyDM,SAAzD;EACA,OAAOvB,cAAc,CAACW,QAAf,CAAwBY,SAAxB,CAAP;AACD;;AACD,SAAST,gBAAT,CAA0BD,OAA1B,EAA0D;EACxDb,cAAc,CAACc,gBAAf,CAAgCD,OAAhC;AACD"}
|
package/lib/module/index.js
CHANGED
|
@@ -18,6 +18,13 @@ export function startGrouplink(token, debbugable) {
|
|
|
18
18
|
startIOS(token);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
export function getUserId(success) {
|
|
22
|
+
if (isAndroid()) {
|
|
23
|
+
getUserIdAndroid(success);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (isiOS()) {}
|
|
27
|
+
}
|
|
21
28
|
export function setFirebaseToken(token) {
|
|
22
29
|
if (isAndroid()) {
|
|
23
30
|
console.log("Android: setting firebase token");
|
|
@@ -61,4 +68,8 @@ function startIOS(withToken) {
|
|
|
61
68
|
console.log('Group Link SDK (iOS) - Start with token: ', withToken);
|
|
62
69
|
return RNGroupLinkSDK.startIOS(withToken);
|
|
63
70
|
}
|
|
71
|
+
|
|
72
|
+
function getUserIdAndroid(success) {
|
|
73
|
+
RNGroupLinkSDK.getUserIdAndroid(success);
|
|
74
|
+
}
|
|
64
75
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","RNGroupLinkSDK","Proxy","get","Error","startGrouplink","token","debbugable","isAndroid","startAndroid","isiOS","startIOS","setFirebaseToken","console","log","startBluetoothIOS","setDevicePushTokenIOS","setDevicePushToken","startLocationIOS","OS","withToken"],"sources":["index.tsx"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\n\nconst LINKING_ERROR =\n `The package 'grouplink-sdk' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nconst RNGroupLinkSDK = NativeModules.RNGroupLinkSDK\n ? NativeModules.RNGroupLinkSDK\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport function startGrouplink(token: string, debbugable: boolean) {\n if (isAndroid()) {\n startAndroid(token, debbugable);\n }\n if (isiOS()) {\n startIOS(token);\n }\n}\n\nexport function setFirebaseToken(token: string){\n if(isAndroid()){\n console.log(\"Android: setting firebase token\")\n RNGroupLinkSDK.setFirebaseToken(token);\n }\n}\n\nexport function startBluetoothIOS() {\n if (isiOS()) {\n console.log('Group Link SDK (iOS) - Start Bluetooth Stack');\n return RNGroupLinkSDK.startBluetoothIOS();\n }\n return;\n}\n\nexport function setDevicePushTokenIOS(token: string) {\n return RNGroupLinkSDK.setDevicePushToken(token)\n}\n\nexport function startLocationIOS() {\n if (isiOS()) {\n console.log('Group Link SDK (iOS) - Start Location Stack');\n return RNGroupLinkSDK.startLocationIOS();\n }\n return;\n}\n\nfunction isAndroid() {\n return Platform.OS == 'android';\n}\n\nfunction isiOS() {\n return Platform.OS == 'ios';\n}\n\nfunction startAndroid(withToken: string, debbugable: boolean) {\n console.log('Group Link SDK (Android) - Start with token: ', withToken);\n return RNGroupLinkSDK.startAndroid(withToken, debbugable);\n}\n\nfunction startIOS(withToken: string) {\n console.log('Group Link SDK (iOS) - Start with token: ', withToken);\n return RNGroupLinkSDK.startIOS(withToken);\n}\n"],"mappings":"AAAA,SAASA,aAAT,EAAwBC,QAAxB,QAAwC,cAAxC;AAEA,MAAMC,aAAa,GAChB,wEAAD,GACAD,QAAQ,CAACE,MAAT,CAAgB;EAAEC,GAAG,EAAE,gCAAP;EAAyCC,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJF;AAMA,MAAMC,cAAc,GAAGN,aAAa,CAACM,cAAd,GACnBN,aAAa,CAACM,cADK,GAEnB,IAAIC,KAAJ,CACE,EADF,EAEE;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAJ,CAAUP,aAAV,CAAN;EACD;;AAHH,CAFF,CAFJ;AAWA,OAAO,SAASQ,cAAT,CAAwBC,KAAxB,EAAuCC,UAAvC,EAA4D;EACjE,IAAIC,SAAS,EAAb,EAAiB;IACfC,YAAY,CAACH,KAAD,EAAQC,UAAR,CAAZ;EACD;;EACD,IAAIG,KAAK,EAAT,EAAa;IACXC,QAAQ,CAACL,KAAD,CAAR;EACD;AACF;AAED,OAAO,SAASM,gBAAT,
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","RNGroupLinkSDK","Proxy","get","Error","startGrouplink","token","debbugable","isAndroid","startAndroid","isiOS","startIOS","getUserId","success","getUserIdAndroid","setFirebaseToken","console","log","startBluetoothIOS","setDevicePushTokenIOS","setDevicePushToken","startLocationIOS","OS","withToken"],"sources":["index.tsx"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\n\nconst LINKING_ERROR =\n `The package 'grouplink-sdk' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nconst RNGroupLinkSDK = NativeModules.RNGroupLinkSDK\n ? NativeModules.RNGroupLinkSDK\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport function startGrouplink(token: string, debbugable: boolean) {\n if (isAndroid()) {\n startAndroid(token, debbugable);\n }\n if (isiOS()) {\n startIOS(token);\n }\n}\n\nexport function getUserId(success: (userId:string)=>void) {\n if (isAndroid()) {\n getUserIdAndroid(success)\n }\n if (isiOS()) {\n \n }\n}\n\nexport function setFirebaseToken(token: string){\n if(isAndroid()){\n console.log(\"Android: setting firebase token\")\n RNGroupLinkSDK.setFirebaseToken(token);\n }\n}\n\nexport function startBluetoothIOS() {\n if (isiOS()) {\n console.log('Group Link SDK (iOS) - Start Bluetooth Stack');\n return RNGroupLinkSDK.startBluetoothIOS();\n }\n return;\n}\n\nexport function setDevicePushTokenIOS(token: string) {\n return RNGroupLinkSDK.setDevicePushToken(token)\n}\n\nexport function startLocationIOS() {\n if (isiOS()) {\n console.log('Group Link SDK (iOS) - Start Location Stack');\n return RNGroupLinkSDK.startLocationIOS();\n }\n return;\n}\n\nfunction isAndroid() {\n return Platform.OS == 'android';\n}\n\nfunction isiOS() {\n return Platform.OS == 'ios';\n}\n\nfunction startAndroid(withToken: string, debbugable: boolean) {\n console.log('Group Link SDK (Android) - Start with token: ', withToken);\n return RNGroupLinkSDK.startAndroid(withToken, debbugable);\n}\n\nfunction startIOS(withToken: string) {\n console.log('Group Link SDK (iOS) - Start with token: ', withToken);\n return RNGroupLinkSDK.startIOS(withToken);\n}\nfunction getUserIdAndroid(success: (userId:string)=>void) {\n RNGroupLinkSDK.getUserIdAndroid(success);\n}\n\n\n"],"mappings":"AAAA,SAASA,aAAT,EAAwBC,QAAxB,QAAwC,cAAxC;AAEA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AAO,CAACC,GAAR,CAAY,6CAAZ;IACA,OAAOhB,cAAc,CAACoB,gBAAf,EAAP;EACD;;EACD;AACD;;AAED,SAASb,SAAT,GAAqB;EACnB,OAAOZ,QAAQ,CAAC0B,EAAT,IAAe,SAAtB;AACD;;AAED,SAASZ,KAAT,GAAiB;EACf,OAAOd,QAAQ,CAAC0B,EAAT,IAAe,KAAtB;AACD;;AAED,SAASb,YAAT,CAAsBc,SAAtB,EAAyChB,UAAzC,EAA8D;EAC5DS,OAAO,CAACC,GAAR,CAAY,+CAAZ,EAA6DM,SAA7D;EACA,OAAOtB,cAAc,CAACQ,YAAf,CAA4Bc,SAA5B,EAAuChB,UAAvC,CAAP;AACD;;AAED,SAASI,QAAT,CAAkBY,SAAlB,EAAqC;EACnCP,OAAO,CAACC,GAAR,CAAY,2CAAZ,EAAyDM,SAAzD;EACA,OAAOtB,cAAc,CAACU,QAAf,CAAwBY,SAAxB,CAAP;AACD;;AACD,SAAST,gBAAT,CAA0BD,OAA1B,EAA0D;EACxDZ,cAAc,CAACa,gBAAf,CAAgCD,OAAhC;AACD"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function startGrouplink(token: string, debbugable: boolean): void;
|
|
2
|
+
export declare function getUserId(success: (userId: string) => void): void;
|
|
2
3
|
export declare function setFirebaseToken(token: string): void;
|
|
3
4
|
export declare function startBluetoothIOS(): any;
|
|
4
5
|
export declare function setDevicePushTokenIOS(token: string): any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grouplinknetwork/rn-grouplink-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "test",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://github.com/amazingvitor/grouplink-sdk#readme",
|
|
45
45
|
"publishConfig": {
|
|
46
|
-
"registry": "https://registry.npmjs.org/"
|
|
46
|
+
"registry": "https://registry.npmjs.org/",
|
|
47
|
+
"access": "public"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@arkweid/lefthook": "^0.7.7",
|
package/src/index.tsx
CHANGED
|
@@ -26,6 +26,15 @@ export function startGrouplink(token: string, debbugable: boolean) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
export function getUserId(success: (userId:string)=>void) {
|
|
30
|
+
if (isAndroid()) {
|
|
31
|
+
getUserIdAndroid(success)
|
|
32
|
+
}
|
|
33
|
+
if (isiOS()) {
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
29
38
|
export function setFirebaseToken(token: string){
|
|
30
39
|
if(isAndroid()){
|
|
31
40
|
console.log("Android: setting firebase token")
|
|
@@ -70,3 +79,8 @@ function startIOS(withToken: string) {
|
|
|
70
79
|
console.log('Group Link SDK (iOS) - Start with token: ', withToken);
|
|
71
80
|
return RNGroupLinkSDK.startIOS(withToken);
|
|
72
81
|
}
|
|
82
|
+
function getUserIdAndroid(success: (userId:string)=>void) {
|
|
83
|
+
RNGroupLinkSDK.getUserIdAndroid(success);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|