@grouplinknetwork/rn-grouplink-sdk 2.5.1 → 2.6.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/README.md +0 -12
- package/android/src/main/java/com/grouplinksdk/GrouplinkSdkModule.java +17 -0
- package/grouplink-sdk.podspec +1 -1
- package/ios/GrouplinkSdk.mm +11 -2
- package/ios/GrouplinkSdk.swift +6 -1
- package/ios/GrouplinkSdk.xcodeproj/project.xcworkspace/xcuserdata/gabrieltorelo.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/lib/commonjs/NativeGrouplinkSdk.js.map +1 -1
- package/lib/commonjs/index.js +54 -13
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/NativeGrouplinkSdk.js.map +1 -1
- package/lib/module/index.js +53 -13
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/NativeGrouplinkSdk.d.ts +14 -0
- package/lib/typescript/NativeGrouplinkSdk.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +25 -3
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/NativeGrouplinkSdk.ts +14 -0
- package/src/index.tsx +54 -13
package/README.md
CHANGED
|
@@ -72,21 +72,9 @@ Usage: Start the bluetooth in Android, and request it in app.
|
|
|
72
72
|
Usage: Start the bluetooth in iOS, and request it in app.
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
### setNotificationToken
|
|
76
|
-
Usage: Set notification by a argument required token.
|
|
77
|
-
|
|
78
|
-
|
|
79
75
|
### requestFullIntentPermissionAndroid
|
|
80
76
|
Usage: Request the full intent permission in settings of android mobile phone.
|
|
81
77
|
|
|
82
78
|
|
|
83
79
|
### requestScheduleExactAlarmPermissionAndroid
|
|
84
80
|
Usage: Request the schedule exact alarm permission.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
### setNotificationNameAndroid
|
|
88
|
-
Usage: Set a notification name by argument in android.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
### getNotificationNameAndroid
|
|
92
|
-
Usage: Get the notification name used by a android mobile phone.
|
|
@@ -102,6 +102,17 @@ public class GrouplinkSdkModule extends NativeGrouplinkSdkSpec implements Lifecy
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
@Override
|
|
106
|
+
@ReactMethod
|
|
107
|
+
public void setRemoteId(String remoteId) {
|
|
108
|
+
try {
|
|
109
|
+
Context context = mReactApplicationContext.getApplicationContext();
|
|
110
|
+
GroupLink.setRemoteId(context, remoteId);
|
|
111
|
+
} catch (Exception e) {
|
|
112
|
+
Log.e("setRemoteId", "Failed: " + e.getMessage());
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
105
116
|
@Override
|
|
106
117
|
@ReactMethod
|
|
107
118
|
public void setNotificationNameAndroid(String notificationName) {
|
|
@@ -164,6 +175,12 @@ public class GrouplinkSdkModule extends NativeGrouplinkSdkSpec implements Lifecy
|
|
|
164
175
|
// iOS only
|
|
165
176
|
}
|
|
166
177
|
|
|
178
|
+
@Override
|
|
179
|
+
@ReactMethod
|
|
180
|
+
public void setRemoteIdIOS(String remoteId) {
|
|
181
|
+
// iOS only
|
|
182
|
+
}
|
|
183
|
+
|
|
167
184
|
@Override
|
|
168
185
|
@ReactMethod
|
|
169
186
|
public void startBluetoothIOS() {
|
package/grouplink-sdk.podspec
CHANGED
|
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
18
|
|
|
19
|
-
s.dependency "GroupLinkSDK", "~>
|
|
19
|
+
s.dependency "GroupLinkSDK", "~> 6.2.0"
|
|
20
20
|
s.dependency "React-Core"
|
|
21
21
|
|
|
22
22
|
# Don't install the dependencies when we run `pod install` in the old architecture.
|
package/ios/GrouplinkSdk.mm
CHANGED
|
@@ -39,7 +39,7 @@ RCT_EXPORT_MODULE(RNGroupLinkSDK)
|
|
|
39
39
|
// ---------------------------------------------------------------------------
|
|
40
40
|
|
|
41
41
|
- (void)startIOS:(NSString *)withToken {
|
|
42
|
-
[GrouplinkBridge
|
|
42
|
+
[GrouplinkBridge startIOSWithToken:withToken];
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
- (void)setDevicePushToken:(NSString *)withPushToken {
|
|
@@ -58,6 +58,11 @@ RCT_EXPORT_MODULE(RNGroupLinkSDK)
|
|
|
58
58
|
[GrouplinkBridge startLocation];
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
- (void)setRemoteIdIOS:(NSString *)remoteId {
|
|
62
|
+
_iosNotificationName = remoteId;
|
|
63
|
+
[GrouplinkBridge setRemoteIdIOS:remoteId];
|
|
64
|
+
}
|
|
65
|
+
|
|
61
66
|
- (void)setNotificationNameIOS:(NSString *)withNotificationName {
|
|
62
67
|
_iosNotificationName = withNotificationName;
|
|
63
68
|
[GrouplinkBridge setNotificationName:withNotificationName];
|
|
@@ -131,7 +136,7 @@ RCT_EXPORT_MODULE(RNGroupLinkSDK)
|
|
|
131
136
|
// ---------------------------------------------------------------------------
|
|
132
137
|
|
|
133
138
|
RCT_EXPORT_METHOD(startIOS:(NSString *)withToken) {
|
|
134
|
-
[GrouplinkBridge
|
|
139
|
+
[GrouplinkBridge startIOSWithToken:withToken];
|
|
135
140
|
}
|
|
136
141
|
|
|
137
142
|
RCT_EXPORT_METHOD(setDevicePushToken:(NSString *)withPushToken) {
|
|
@@ -150,6 +155,10 @@ RCT_EXPORT_METHOD(startLocationIOS) {
|
|
|
150
155
|
[GrouplinkBridge startLocation];
|
|
151
156
|
}
|
|
152
157
|
|
|
158
|
+
RCT_EXPORT_METHOD(setRemoteIdIOS:(NSString *)remoteId) {
|
|
159
|
+
[GrouplinkBridge setRemoteIdIOS:remoteId];
|
|
160
|
+
}
|
|
161
|
+
|
|
153
162
|
RCT_EXPORT_METHOD(setNotificationNameIOS:(NSString *)withNotificationName) {
|
|
154
163
|
_iosNotificationName = withNotificationName;
|
|
155
164
|
[GrouplinkBridge setNotificationName:withNotificationName];
|
package/ios/GrouplinkSdk.swift
CHANGED
|
@@ -5,7 +5,8 @@ import GroupLink
|
|
|
5
5
|
/// Necessary because GroupLink.xcframework only exports Swift ABI symbols,
|
|
6
6
|
/// not ObjC class symbols, so direct ObjC++ calls would fail at link time.
|
|
7
7
|
@objc public class GrouplinkBridge: NSObject {
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
@objc public static func startIOS(token: String) {
|
|
9
10
|
GroupLinkSDK.start(withToken: token)
|
|
10
11
|
}
|
|
11
12
|
|
|
@@ -25,6 +26,10 @@ import GroupLink
|
|
|
25
26
|
GroupLinkSDK.setNotificationName(name)
|
|
26
27
|
}
|
|
27
28
|
|
|
29
|
+
@objc public static func setRemoteIdIOS(_ remoteId: String) {
|
|
30
|
+
GroupLinkSDK.setRemoteId(remoteId)
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
@objc public static func getUserID() -> String? {
|
|
29
34
|
return GroupLinkSDK.getUserID()
|
|
30
35
|
}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeGrouplinkSdk.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeGrouplinkSdk.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAqCpCC,gCAAmB,CAACC,YAAY,CAAO,gBAAgB,CAAC","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -14,6 +14,7 @@ exports.setFirebaseToken = setFirebaseToken;
|
|
|
14
14
|
exports.setNotificationName = setNotificationName;
|
|
15
15
|
exports.setNotificationNameAndroid = setNotificationNameAndroid;
|
|
16
16
|
exports.setNotificationNameIOS = setNotificationNameIOS;
|
|
17
|
+
exports.setRemoteId = setRemoteId;
|
|
17
18
|
exports.startBluetooth = startBluetooth;
|
|
18
19
|
exports.startBluetoothAndroid = startBluetoothAndroid;
|
|
19
20
|
exports.startBluetoothIOS = startBluetoothIOS;
|
|
@@ -39,6 +40,10 @@ async function getUserId() {
|
|
|
39
40
|
}
|
|
40
41
|
return Promise.reject('Internal Error');
|
|
41
42
|
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated No longer supported.
|
|
46
|
+
*/
|
|
42
47
|
function setFirebaseToken(token) {
|
|
43
48
|
if (token == null || token === '') {
|
|
44
49
|
_reportError('setFirebaseToken(token: string)', 'Requires a valid Firebase (FCM) token string.');
|
|
@@ -53,6 +58,10 @@ function startBluetoothIOS() {
|
|
|
53
58
|
_NativeGrouplinkSdk.default.startBluetoothIOS();
|
|
54
59
|
}
|
|
55
60
|
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated No longer supported.
|
|
64
|
+
*/
|
|
56
65
|
function setDevicePushTokenIOS(token) {
|
|
57
66
|
if (token == null || token === '') {
|
|
58
67
|
_reportError('setDevicePushTokenIOS(token: string)', 'Requires a valid device push token string.');
|
|
@@ -67,35 +76,35 @@ function startLocationIOS() {
|
|
|
67
76
|
_NativeGrouplinkSdk.default.startLocationIOS();
|
|
68
77
|
}
|
|
69
78
|
}
|
|
70
|
-
function startGrouplink(
|
|
71
|
-
if (
|
|
72
|
-
_reportError('startGrouplink(
|
|
79
|
+
function startGrouplink(appLabel, debbugable) {
|
|
80
|
+
if (appLabel == null || appLabel === '') {
|
|
81
|
+
_reportError('startGrouplink(appLabel: string, debbugable?: boolean | null)', 'Requires a valid GroupLink token string.');
|
|
73
82
|
return;
|
|
74
83
|
}
|
|
75
84
|
const debug = debbugable ?? false;
|
|
76
85
|
if (_isiOS()) {
|
|
77
|
-
_NativeGrouplinkSdk.default.startIOS(
|
|
86
|
+
_NativeGrouplinkSdk.default.startIOS(appLabel);
|
|
78
87
|
} else if (_isAndroid()) {
|
|
79
|
-
_NativeGrouplinkSdk.default.startAndroid(
|
|
88
|
+
_NativeGrouplinkSdk.default.startAndroid(appLabel, debug);
|
|
80
89
|
}
|
|
81
90
|
}
|
|
82
|
-
function startGrouplinkAndroid(
|
|
83
|
-
if (
|
|
84
|
-
_reportError('startGrouplinkAndroid(
|
|
91
|
+
function startGrouplinkAndroid(appLabel, debbugable) {
|
|
92
|
+
if (appLabel == null || appLabel === '') {
|
|
93
|
+
_reportError('startGrouplinkAndroid(appLabel: string, debbugable?: boolean | null)', 'Requires a valid GroupLink token string.');
|
|
85
94
|
return;
|
|
86
95
|
}
|
|
87
96
|
const debug = debbugable ?? false;
|
|
88
97
|
if (_isAndroid()) {
|
|
89
|
-
_NativeGrouplinkSdk.default.startAndroid(
|
|
98
|
+
_NativeGrouplinkSdk.default.startAndroid(appLabel, debug);
|
|
90
99
|
}
|
|
91
100
|
}
|
|
92
|
-
function startGrouplinkIOS(
|
|
93
|
-
if (
|
|
94
|
-
_reportError('startGrouplinkIOS(
|
|
101
|
+
function startGrouplinkIOS(appLabel) {
|
|
102
|
+
if (appLabel == null || appLabel === '') {
|
|
103
|
+
_reportError('startGrouplinkIOS(appLabel: string)', 'Requires a valid GroupLink token string.');
|
|
95
104
|
return;
|
|
96
105
|
}
|
|
97
106
|
if (_isiOS()) {
|
|
98
|
-
_NativeGrouplinkSdk.default.startIOS(
|
|
107
|
+
_NativeGrouplinkSdk.default.startIOS(appLabel);
|
|
99
108
|
}
|
|
100
109
|
}
|
|
101
110
|
function checkBluetoothIOS() {
|
|
@@ -136,6 +145,22 @@ function requestFullIntentPermissionAndroid() {
|
|
|
136
145
|
_NativeGrouplinkSdk.default.requestFullIntentPermissionAndroid();
|
|
137
146
|
}
|
|
138
147
|
}
|
|
148
|
+
function setRemoteId(remoteId) {
|
|
149
|
+
if (remoteId == null || remoteId === '') {
|
|
150
|
+
_reportError('setRemoteId(remoteId: string)', 'Requires a valid remote id string.');
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (_isiOS()) {
|
|
154
|
+
_NativeGrouplinkSdk.default.setRemoteIdIOS(remoteId);
|
|
155
|
+
}
|
|
156
|
+
if (_isAndroid()) {
|
|
157
|
+
_NativeGrouplinkSdk.default.setRemoteId(remoteId);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
163
|
+
*/
|
|
139
164
|
function setNotificationNameAndroid(name) {
|
|
140
165
|
if (name == null || name === '') {
|
|
141
166
|
_reportError('setNotificationNameAndroid(name: string)', 'Requires a valid notification name string.');
|
|
@@ -145,12 +170,20 @@ function setNotificationNameAndroid(name) {
|
|
|
145
170
|
_NativeGrouplinkSdk.default.setNotificationNameAndroid(name);
|
|
146
171
|
}
|
|
147
172
|
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @deprecated No longer supported.
|
|
176
|
+
*/
|
|
148
177
|
async function getNotificationNameAndroid() {
|
|
149
178
|
if (_isAndroid()) {
|
|
150
179
|
return _NativeGrouplinkSdk.default.getNotificationNameAndroid();
|
|
151
180
|
}
|
|
152
181
|
return null;
|
|
153
182
|
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
186
|
+
*/
|
|
154
187
|
function setNotificationNameIOS(name) {
|
|
155
188
|
if (name == null || name === '') {
|
|
156
189
|
_reportError('setNotificationNameIOS(name: string)', 'Requires a valid notification name string.');
|
|
@@ -160,12 +193,20 @@ function setNotificationNameIOS(name) {
|
|
|
160
193
|
_NativeGrouplinkSdk.default.setNotificationNameIOS(name);
|
|
161
194
|
}
|
|
162
195
|
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @deprecated No longer supported.
|
|
199
|
+
*/
|
|
163
200
|
async function getNotificationNameIOS() {
|
|
164
201
|
if (_isiOS()) {
|
|
165
202
|
return _NativeGrouplinkSdk.default.getNotificationNameIOS();
|
|
166
203
|
}
|
|
167
204
|
return null;
|
|
168
205
|
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
209
|
+
*/
|
|
169
210
|
function setNotificationName(name) {
|
|
170
211
|
if (name == null || name === '') {
|
|
171
212
|
_reportError('setNotificationName(name: string)', 'Requires a valid notification name string.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_NativeGrouplinkSdk","_interopRequireDefault","e","__esModule","default","getUserId","_isAndroid","userID","NativeGroupLinkSDK","getUserIdAndroid","Promise","resolve","reject","_isiOS","getUserID","setFirebaseToken","token","_reportError","startBluetoothIOS","setDevicePushTokenIOS","setDevicePushToken","startLocationIOS","startGrouplink","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_NativeGrouplinkSdk","_interopRequireDefault","e","__esModule","default","getUserId","_isAndroid","userID","NativeGroupLinkSDK","getUserIdAndroid","Promise","resolve","reject","_isiOS","getUserID","setFirebaseToken","token","_reportError","startBluetoothIOS","setDevicePushTokenIOS","setDevicePushToken","startLocationIOS","startGrouplink","appLabel","debbugable","debug","startIOS","startAndroid","startGrouplinkAndroid","startGrouplinkIOS","checkBluetoothIOS","startBluetoothAndroid","Platform","OS","Version","bluetoothPermission","PermissionsAndroid","requestMultiple","PERMISSIONS","BLUETOOTH_SCAN","BLUETOOTH_ADVERTISE","BLUETOOTH_CONNECT","RESULTS","GRANTED","startLocationAndroid","locationPermission","ACCESS_FINE_LOCATION","ACCESS_COARSE_LOCATION","startLocation","startBluetooth","requestFullIntentPermissionAndroid","setRemoteId","remoteId","setRemoteIdIOS","setNotificationNameAndroid","name","getNotificationNameAndroid","setNotificationNameIOS","getNotificationNameIOS","setNotificationName","requestScheduleExactAlarmPermissionAndroid","requestScheduleExactAlarm","signature","message","err","Error","stack","lines","split","slice","join","console","error"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAsD,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE/C,eAAeG,SAASA,CAAA,EAA2B;EACxD,IAAIC,UAAU,CAAC,CAAC,EAAE;IAChB,MAAMC,MAAc,GAAG,MAAMC,2BAAkB,CAACC,gBAAgB,CAAC,CAAC;IAClE,IAAIF,MAAM,KAAK,0BAA0B,EAAE;MACzC,OAAOG,OAAO,CAACC,OAAO,CAACJ,MAAM,CAAC;IAChC,CAAC,MAAM;MACL,OAAOG,OAAO,CAACE,MAAM,CAAC,2BAA2B,CAAC;IACpD;EACF,CAAC,MAAM,IAAIC,MAAM,CAAC,CAAC,EAAE;IACnB,OAAOL,2BAAkB,CAACM,SAAS,CAAC,CAAC;EACvC;EAEA,OAAOJ,OAAO,CAACE,MAAM,CAAC,gBAAgB,CAAC;AACzC;;AAEA;AACA;AACA;AACO,SAASG,gBAAgBA,CAACC,KAAa,EAAE;EAC9C,IAAIA,KAAK,IAAI,IAAI,IAAIA,KAAK,KAAK,EAAE,EAAE;IACjCC,YAAY,CACV,iCAAiC,EACjC,+CACF,CAAC;IAED;EACF;EAEA,IAAIX,UAAU,CAAC,CAAC,EAAE;IAChBE,2BAAkB,CAACO,gBAAgB,CAACC,KAAK,CAAC;EAC5C;AACF;AAEO,SAASE,iBAAiBA,CAAA,EAAG;EAClC,IAAIL,MAAM,CAAC,CAAC,EAAE;IACZL,2BAAkB,CAACU,iBAAiB,CAAC,CAAC;EACxC;AACF;;AAEA;AACA;AACA;AACO,SAASC,qBAAqBA,CAACH,KAAa,EAAE;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iB,EAAEC,OAAe,EAAE;EACxD,MAAMC,GAAG,GAAG,IAAIC,KAAK,CAAC,kBAAkBH,SAAS,MAAMC,OAAO,EAAE,CAAC;EAEjE,IAAIC,GAAG,CAACE,KAAK,EAAE;IACb,MAAMC,KAAK,GAAGH,GAAG,CAACE,KAAK,CAACE,KAAK,CAAC,IAAI,CAAC;IACnCJ,GAAG,CAACE,KAAK,GAAG,CAACC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAGA,KAAK,CAACE,KAAK,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;EACtD;EAEAC,OAAO,CAACC,KAAK,CAACR,GAAG,CAAC;AACpB;AAEA,SAAS1D,UAAUA,CAAA,EAAG;EACpB,OAAO0B,qBAAQ,CAACC,EAAE,KAAK,SAAS;AAClC;AAEA,SAASpB,MAAMA,CAAA,EAAG;EAChB,OAAOmB,qBAAQ,CAACC,EAAE,KAAK,KAAK;AAC9B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeGrouplinkSdk.ts"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeGrouplinkSdk.ts"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,cAAc;AAqClD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,gBAAgB,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -13,6 +13,10 @@ export async function getUserId() {
|
|
|
13
13
|
}
|
|
14
14
|
return Promise.reject('Internal Error');
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated No longer supported.
|
|
19
|
+
*/
|
|
16
20
|
export function setFirebaseToken(token) {
|
|
17
21
|
if (token == null || token === '') {
|
|
18
22
|
_reportError('setFirebaseToken(token: string)', 'Requires a valid Firebase (FCM) token string.');
|
|
@@ -27,6 +31,10 @@ export function startBluetoothIOS() {
|
|
|
27
31
|
NativeGroupLinkSDK.startBluetoothIOS();
|
|
28
32
|
}
|
|
29
33
|
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated No longer supported.
|
|
37
|
+
*/
|
|
30
38
|
export function setDevicePushTokenIOS(token) {
|
|
31
39
|
if (token == null || token === '') {
|
|
32
40
|
_reportError('setDevicePushTokenIOS(token: string)', 'Requires a valid device push token string.');
|
|
@@ -41,35 +49,35 @@ export function startLocationIOS() {
|
|
|
41
49
|
NativeGroupLinkSDK.startLocationIOS();
|
|
42
50
|
}
|
|
43
51
|
}
|
|
44
|
-
export function startGrouplink(
|
|
45
|
-
if (
|
|
46
|
-
_reportError('startGrouplink(
|
|
52
|
+
export function startGrouplink(appLabel, debbugable) {
|
|
53
|
+
if (appLabel == null || appLabel === '') {
|
|
54
|
+
_reportError('startGrouplink(appLabel: string, debbugable?: boolean | null)', 'Requires a valid GroupLink token string.');
|
|
47
55
|
return;
|
|
48
56
|
}
|
|
49
57
|
const debug = debbugable ?? false;
|
|
50
58
|
if (_isiOS()) {
|
|
51
|
-
NativeGroupLinkSDK.startIOS(
|
|
59
|
+
NativeGroupLinkSDK.startIOS(appLabel);
|
|
52
60
|
} else if (_isAndroid()) {
|
|
53
|
-
NativeGroupLinkSDK.startAndroid(
|
|
61
|
+
NativeGroupLinkSDK.startAndroid(appLabel, debug);
|
|
54
62
|
}
|
|
55
63
|
}
|
|
56
|
-
export function startGrouplinkAndroid(
|
|
57
|
-
if (
|
|
58
|
-
_reportError('startGrouplinkAndroid(
|
|
64
|
+
export function startGrouplinkAndroid(appLabel, debbugable) {
|
|
65
|
+
if (appLabel == null || appLabel === '') {
|
|
66
|
+
_reportError('startGrouplinkAndroid(appLabel: string, debbugable?: boolean | null)', 'Requires a valid GroupLink token string.');
|
|
59
67
|
return;
|
|
60
68
|
}
|
|
61
69
|
const debug = debbugable ?? false;
|
|
62
70
|
if (_isAndroid()) {
|
|
63
|
-
NativeGroupLinkSDK.startAndroid(
|
|
71
|
+
NativeGroupLinkSDK.startAndroid(appLabel, debug);
|
|
64
72
|
}
|
|
65
73
|
}
|
|
66
|
-
export function startGrouplinkIOS(
|
|
67
|
-
if (
|
|
68
|
-
_reportError('startGrouplinkIOS(
|
|
74
|
+
export function startGrouplinkIOS(appLabel) {
|
|
75
|
+
if (appLabel == null || appLabel === '') {
|
|
76
|
+
_reportError('startGrouplinkIOS(appLabel: string)', 'Requires a valid GroupLink token string.');
|
|
69
77
|
return;
|
|
70
78
|
}
|
|
71
79
|
if (_isiOS()) {
|
|
72
|
-
NativeGroupLinkSDK.startIOS(
|
|
80
|
+
NativeGroupLinkSDK.startIOS(appLabel);
|
|
73
81
|
}
|
|
74
82
|
}
|
|
75
83
|
export function checkBluetoothIOS() {
|
|
@@ -110,6 +118,22 @@ export function requestFullIntentPermissionAndroid() {
|
|
|
110
118
|
NativeGroupLinkSDK.requestFullIntentPermissionAndroid();
|
|
111
119
|
}
|
|
112
120
|
}
|
|
121
|
+
export function setRemoteId(remoteId) {
|
|
122
|
+
if (remoteId == null || remoteId === '') {
|
|
123
|
+
_reportError('setRemoteId(remoteId: string)', 'Requires a valid remote id string.');
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (_isiOS()) {
|
|
127
|
+
NativeGroupLinkSDK.setRemoteIdIOS(remoteId);
|
|
128
|
+
}
|
|
129
|
+
if (_isAndroid()) {
|
|
130
|
+
NativeGroupLinkSDK.setRemoteId(remoteId);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
136
|
+
*/
|
|
113
137
|
export function setNotificationNameAndroid(name) {
|
|
114
138
|
if (name == null || name === '') {
|
|
115
139
|
_reportError('setNotificationNameAndroid(name: string)', 'Requires a valid notification name string.');
|
|
@@ -119,12 +143,20 @@ export function setNotificationNameAndroid(name) {
|
|
|
119
143
|
NativeGroupLinkSDK.setNotificationNameAndroid(name);
|
|
120
144
|
}
|
|
121
145
|
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @deprecated No longer supported.
|
|
149
|
+
*/
|
|
122
150
|
export async function getNotificationNameAndroid() {
|
|
123
151
|
if (_isAndroid()) {
|
|
124
152
|
return NativeGroupLinkSDK.getNotificationNameAndroid();
|
|
125
153
|
}
|
|
126
154
|
return null;
|
|
127
155
|
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
159
|
+
*/
|
|
128
160
|
export function setNotificationNameIOS(name) {
|
|
129
161
|
if (name == null || name === '') {
|
|
130
162
|
_reportError('setNotificationNameIOS(name: string)', 'Requires a valid notification name string.');
|
|
@@ -134,12 +166,20 @@ export function setNotificationNameIOS(name) {
|
|
|
134
166
|
NativeGroupLinkSDK.setNotificationNameIOS(name);
|
|
135
167
|
}
|
|
136
168
|
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @deprecated No longer supported.
|
|
172
|
+
*/
|
|
137
173
|
export async function getNotificationNameIOS() {
|
|
138
174
|
if (_isiOS()) {
|
|
139
175
|
return NativeGroupLinkSDK.getNotificationNameIOS();
|
|
140
176
|
}
|
|
141
177
|
return null;
|
|
142
178
|
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
182
|
+
*/
|
|
143
183
|
export function setNotificationName(name) {
|
|
144
184
|
if (name == null || name === '') {
|
|
145
185
|
_reportError('setNotificationName(name: string)', 'Requires a valid notification name string.');
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PermissionsAndroid","Platform","NativeGroupLinkSDK","getUserId","_isAndroid","userID","getUserIdAndroid","Promise","resolve","reject","_isiOS","getUserID","setFirebaseToken","token","_reportError","startBluetoothIOS","setDevicePushTokenIOS","setDevicePushToken","startLocationIOS","startGrouplink","
|
|
1
|
+
{"version":3,"names":["PermissionsAndroid","Platform","NativeGroupLinkSDK","getUserId","_isAndroid","userID","getUserIdAndroid","Promise","resolve","reject","_isiOS","getUserID","setFirebaseToken","token","_reportError","startBluetoothIOS","setDevicePushTokenIOS","setDevicePushToken","startLocationIOS","startGrouplink","appLabel","debbugable","debug","startIOS","startAndroid","startGrouplinkAndroid","startGrouplinkIOS","checkBluetoothIOS","startBluetoothAndroid","OS","Version","bluetoothPermission","requestMultiple","PERMISSIONS","BLUETOOTH_SCAN","BLUETOOTH_ADVERTISE","BLUETOOTH_CONNECT","RESULTS","GRANTED","startLocationAndroid","locationPermission","ACCESS_FINE_LOCATION","ACCESS_COARSE_LOCATION","startLocation","startBluetooth","requestFullIntentPermissionAndroid","setRemoteId","remoteId","setRemoteIdIOS","setNotificationNameAndroid","name","getNotificationNameAndroid","setNotificationNameIOS","getNotificationNameIOS","setNotificationName","requestScheduleExactAlarmPermissionAndroid","requestScheduleExactAlarm","signature","message","err","Error","stack","lines","split","slice","join","console","error"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;AAC3D,OAAOC,kBAAkB,MAAM,sBAAsB;AAErD,OAAO,eAAeC,SAASA,CAAA,EAA2B;EACxD,IAAIC,UAAU,CAAC,CAAC,EAAE;IAChB,MAAMC,MAAc,GAAG,MAAMH,kBAAkB,CAACI,gBAAgB,CAAC,CAAC;IAClE,IAAID,MAAM,KAAK,0BAA0B,EAAE;MACzC,OAAOE,OAAO,CAACC,OAAO,CAACH,MAAM,CAAC;IAChC,CAAC,MAAM;MACL,OAAOE,OAAO,CAACE,MAAM,CAAC,2BAA2B,CAAC;IACpD;EACF,CAAC,MAAM,IAAIC,MAAM,CAAC,CAAC,EAAE;IACnB,OAAOR,kBAAkB,CAACS,SAAS,CAAC,CAAC;EACvC;EAEA,OAAOJ,O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,KAAK;AAC9B","ignoreList":[]}
|
|
@@ -4,16 +4,30 @@ export interface Spec extends TurboModule {
|
|
|
4
4
|
startAndroid(token: string, debbugable: boolean): void;
|
|
5
5
|
setFirebaseToken(token: string): void;
|
|
6
6
|
requestFullIntentPermissionAndroid(): void;
|
|
7
|
+
setRemoteId(remoteId: string): void;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
10
|
+
*/
|
|
7
11
|
setNotificationNameAndroid(notificationName: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated No longer supported.
|
|
14
|
+
*/
|
|
8
15
|
getNotificationNameAndroid(): Promise<string>;
|
|
9
16
|
requestScheduleExactAlarm(): void;
|
|
10
17
|
getUserID(): Promise<string>;
|
|
11
18
|
setDevicePushToken(withPushToken: string): void;
|
|
12
19
|
startIOS(withToken: string): void;
|
|
20
|
+
setRemoteIdIOS(remoteId: string): void;
|
|
13
21
|
startBluetoothIOS(): void;
|
|
14
22
|
checkBluetoothIOS(): void;
|
|
15
23
|
startLocationIOS(): void;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
26
|
+
*/
|
|
16
27
|
setNotificationNameIOS(withNotificationName: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated No longer supported.
|
|
30
|
+
*/
|
|
17
31
|
getNotificationNameIOS(): Promise<string>;
|
|
18
32
|
}
|
|
19
33
|
declare const _default: Spec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeGrouplinkSdk.d.ts","sourceRoot":"","sources":["../../src/NativeGrouplinkSdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IAEvC,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,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O,CAAC,MAAM,CAAC,CAAC;IAC9C,yBAAyB,IAAI,IAAI,CAAC;IAGlC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7B,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAChD,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,iBAAiB,IAAI,IAAI,CAAC;IAC1B,iBAAiB,IAAI,IAAI,CAAC;IAC1B,gBAAgB,IAAI,IAAI,CAAC;IACzB;;MAEE;IACF,sBAAsB,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3D;;MAEE;IACF,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3C;;AAED,wBAAwE"}
|
|
@@ -1,21 +1,43 @@
|
|
|
1
1
|
export declare function getUserId(): Promise<string | null>;
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated No longer supported.
|
|
4
|
+
*/
|
|
2
5
|
export declare function setFirebaseToken(token: string): void;
|
|
3
6
|
export declare function startBluetoothIOS(): void;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated No longer supported.
|
|
9
|
+
*/
|
|
4
10
|
export declare function setDevicePushTokenIOS(token: string): void;
|
|
5
11
|
export declare function startLocationIOS(): void;
|
|
6
|
-
export declare function startGrouplink(
|
|
7
|
-
export declare function startGrouplinkAndroid(
|
|
8
|
-
export declare function startGrouplinkIOS(
|
|
12
|
+
export declare function startGrouplink(appLabel: string, debbugable?: boolean | null): void;
|
|
13
|
+
export declare function startGrouplinkAndroid(appLabel: string, debbugable?: boolean | null): void;
|
|
14
|
+
export declare function startGrouplinkIOS(appLabel: string): void;
|
|
9
15
|
export declare function checkBluetoothIOS(): void;
|
|
10
16
|
export declare function startBluetoothAndroid(): Promise<void>;
|
|
11
17
|
export declare function startLocationAndroid(): Promise<void>;
|
|
12
18
|
export declare function startLocation(): Promise<void>;
|
|
13
19
|
export declare function startBluetooth(): Promise<void>;
|
|
14
20
|
export declare function requestFullIntentPermissionAndroid(): void;
|
|
21
|
+
export declare function setRemoteId(remoteId: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
24
|
+
*/
|
|
15
25
|
export declare function setNotificationNameAndroid(name: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated No longer supported.
|
|
28
|
+
*/
|
|
16
29
|
export declare function getNotificationNameAndroid(): Promise<string | null>;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
32
|
+
*/
|
|
17
33
|
export declare function setNotificationNameIOS(name: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated No longer supported.
|
|
36
|
+
*/
|
|
18
37
|
export declare function getNotificationNameIOS(): Promise<string | null>;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
40
|
+
*/
|
|
19
41
|
export declare function setNotificationName(name: string): void;
|
|
20
42
|
export declare function requestScheduleExactAlarmPermissionAndroid(): void;
|
|
21
43
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAGA,wBAAsB,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAaxD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,QAa7C;AAED,wBAAgB,iBAAiB,SAIhC;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,QAalD;AAED,wBAAgB,gBAAgB,SAI/B;AAED,wBAAgB,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAGA,wBAAsB,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAaxD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,QAa7C;AAED,wBAAgB,iBAAiB,SAIhC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,QAalD;AAED,wBAAgB,gBAAgB,SAI/B;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,QAiB3E;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,QAelF;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,QAajD;AAED,wBAAgB,iBAAiB,SAIhC;AAED,wBAAsB,qBAAqB,kBAkB1C;AAED,wBAAsB,oBAAoB,kBAczC;AAED,wBAAsB,aAAa,kBAMlC;AAED,wBAAsB,cAAc,kBAMnC;AAED,wBAAgB,kCAAkC,SAIjD;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,QAkB3C;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,QAatD;AAED;;GAEG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAMzE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,QAalD;AAED;;GAEG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAMrE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,QAe/C;AAED,wBAAgB,0CAA0C,SAIzD"}
|
package/package.json
CHANGED
|
@@ -7,7 +7,14 @@ export interface Spec extends TurboModule {
|
|
|
7
7
|
startAndroid(token: string, debbugable: boolean): void;
|
|
8
8
|
setFirebaseToken(token: string): void;
|
|
9
9
|
requestFullIntentPermissionAndroid(): void;
|
|
10
|
+
setRemoteId(remoteId: string): void;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
13
|
+
*/
|
|
10
14
|
setNotificationNameAndroid(notificationName: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated No longer supported.
|
|
17
|
+
*/
|
|
11
18
|
getNotificationNameAndroid(): Promise<string>;
|
|
12
19
|
requestScheduleExactAlarm(): void;
|
|
13
20
|
|
|
@@ -15,10 +22,17 @@ export interface Spec extends TurboModule {
|
|
|
15
22
|
getUserID(): Promise<string>;
|
|
16
23
|
setDevicePushToken(withPushToken: string): void;
|
|
17
24
|
startIOS(withToken: string): void;
|
|
25
|
+
setRemoteIdIOS(remoteId: string): void;
|
|
18
26
|
startBluetoothIOS(): void;
|
|
19
27
|
checkBluetoothIOS(): void;
|
|
20
28
|
startLocationIOS(): void;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
31
|
+
*/
|
|
21
32
|
setNotificationNameIOS(withNotificationName: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated No longer supported.
|
|
35
|
+
*/
|
|
22
36
|
getNotificationNameIOS(): Promise<string>;
|
|
23
37
|
}
|
|
24
38
|
|
package/src/index.tsx
CHANGED
|
@@ -16,6 +16,9 @@ export async function getUserId(): Promise<string | null> {
|
|
|
16
16
|
return Promise.reject('Internal Error');
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated No longer supported.
|
|
21
|
+
*/
|
|
19
22
|
export function setFirebaseToken(token: string) {
|
|
20
23
|
if (token == null || token === '') {
|
|
21
24
|
_reportError(
|
|
@@ -37,6 +40,9 @@ export function startBluetoothIOS() {
|
|
|
37
40
|
}
|
|
38
41
|
}
|
|
39
42
|
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated No longer supported.
|
|
45
|
+
*/
|
|
40
46
|
export function setDevicePushTokenIOS(token: string) {
|
|
41
47
|
if (token == null || token === '') {
|
|
42
48
|
_reportError(
|
|
@@ -58,10 +64,10 @@ export function startLocationIOS() {
|
|
|
58
64
|
}
|
|
59
65
|
}
|
|
60
66
|
|
|
61
|
-
export function startGrouplink(
|
|
62
|
-
if (
|
|
67
|
+
export function startGrouplink(appLabel: string, debbugable?: boolean | null) {
|
|
68
|
+
if (appLabel == null || appLabel === '') {
|
|
63
69
|
_reportError(
|
|
64
|
-
'startGrouplink(
|
|
70
|
+
'startGrouplink(appLabel: string, debbugable?: boolean | null)',
|
|
65
71
|
'Requires a valid GroupLink token string.'
|
|
66
72
|
);
|
|
67
73
|
|
|
@@ -71,16 +77,16 @@ export function startGrouplink(withToken: string, debbugable?: boolean | null) {
|
|
|
71
77
|
const debug = debbugable ?? false;
|
|
72
78
|
|
|
73
79
|
if (_isiOS()) {
|
|
74
|
-
NativeGroupLinkSDK.startIOS(
|
|
80
|
+
NativeGroupLinkSDK.startIOS(appLabel);
|
|
75
81
|
} else if (_isAndroid()) {
|
|
76
|
-
NativeGroupLinkSDK.startAndroid(
|
|
82
|
+
NativeGroupLinkSDK.startAndroid(appLabel, debug);
|
|
77
83
|
}
|
|
78
84
|
}
|
|
79
85
|
|
|
80
|
-
export function startGrouplinkAndroid(
|
|
81
|
-
if (
|
|
86
|
+
export function startGrouplinkAndroid(appLabel: string, debbugable?: boolean | null) {
|
|
87
|
+
if (appLabel == null || appLabel === '') {
|
|
82
88
|
_reportError(
|
|
83
|
-
'startGrouplinkAndroid(
|
|
89
|
+
'startGrouplinkAndroid(appLabel: string, debbugable?: boolean | null)',
|
|
84
90
|
'Requires a valid GroupLink token string.'
|
|
85
91
|
);
|
|
86
92
|
|
|
@@ -90,14 +96,14 @@ export function startGrouplinkAndroid(withToken: string, debbugable?: boolean |
|
|
|
90
96
|
const debug = debbugable ?? false;
|
|
91
97
|
|
|
92
98
|
if (_isAndroid()) {
|
|
93
|
-
NativeGroupLinkSDK.startAndroid(
|
|
99
|
+
NativeGroupLinkSDK.startAndroid(appLabel, debug);
|
|
94
100
|
}
|
|
95
101
|
}
|
|
96
102
|
|
|
97
|
-
export function startGrouplinkIOS(
|
|
98
|
-
if (
|
|
103
|
+
export function startGrouplinkIOS(appLabel: string) {
|
|
104
|
+
if (appLabel == null || appLabel === '') {
|
|
99
105
|
_reportError(
|
|
100
|
-
'startGrouplinkIOS(
|
|
106
|
+
'startGrouplinkIOS(appLabel: string)',
|
|
101
107
|
'Requires a valid GroupLink token string.'
|
|
102
108
|
);
|
|
103
109
|
|
|
@@ -105,7 +111,7 @@ export function startGrouplinkIOS(withToken: string) {
|
|
|
105
111
|
}
|
|
106
112
|
|
|
107
113
|
if (_isiOS()) {
|
|
108
|
-
NativeGroupLinkSDK.startIOS(
|
|
114
|
+
NativeGroupLinkSDK.startIOS(appLabel);
|
|
109
115
|
}
|
|
110
116
|
}
|
|
111
117
|
|
|
@@ -173,6 +179,29 @@ export function requestFullIntentPermissionAndroid() {
|
|
|
173
179
|
}
|
|
174
180
|
}
|
|
175
181
|
|
|
182
|
+
export function setRemoteId(remoteId: string) {
|
|
183
|
+
if (remoteId == null || remoteId === '') {
|
|
184
|
+
_reportError(
|
|
185
|
+
'setRemoteId(remoteId: string)',
|
|
186
|
+
'Requires a valid remote id string.'
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (_isiOS()) {
|
|
193
|
+
NativeGroupLinkSDK.setRemoteIdIOS(remoteId);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if(_isAndroid()){
|
|
197
|
+
NativeGroupLinkSDK.setRemoteId(remoteId);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
204
|
+
*/
|
|
176
205
|
export function setNotificationNameAndroid(name: string) {
|
|
177
206
|
if (name == null || name === '') {
|
|
178
207
|
_reportError(
|
|
@@ -188,6 +217,9 @@ export function setNotificationNameAndroid(name: string) {
|
|
|
188
217
|
}
|
|
189
218
|
}
|
|
190
219
|
|
|
220
|
+
/**
|
|
221
|
+
* @deprecated No longer supported.
|
|
222
|
+
*/
|
|
191
223
|
export async function getNotificationNameAndroid(): Promise<string | null> {
|
|
192
224
|
if (_isAndroid()) {
|
|
193
225
|
return NativeGroupLinkSDK.getNotificationNameAndroid();
|
|
@@ -196,6 +228,9 @@ export async function getNotificationNameAndroid(): Promise<string | null> {
|
|
|
196
228
|
return null;
|
|
197
229
|
}
|
|
198
230
|
|
|
231
|
+
/**
|
|
232
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
233
|
+
*/
|
|
199
234
|
export function setNotificationNameIOS(name: string) {
|
|
200
235
|
if (name == null || name === '') {
|
|
201
236
|
_reportError(
|
|
@@ -211,6 +246,9 @@ export function setNotificationNameIOS(name: string) {
|
|
|
211
246
|
}
|
|
212
247
|
}
|
|
213
248
|
|
|
249
|
+
/**
|
|
250
|
+
* @deprecated No longer supported.
|
|
251
|
+
*/
|
|
214
252
|
export async function getNotificationNameIOS(): Promise<string | null> {
|
|
215
253
|
if (_isiOS()) {
|
|
216
254
|
return NativeGroupLinkSDK.getNotificationNameIOS();
|
|
@@ -219,6 +257,9 @@ export async function getNotificationNameIOS(): Promise<string | null> {
|
|
|
219
257
|
return null;
|
|
220
258
|
}
|
|
221
259
|
|
|
260
|
+
/**
|
|
261
|
+
* @deprecated The method should not be used. use setRemoteId() instead
|
|
262
|
+
*/
|
|
222
263
|
export function setNotificationName(name: string) {
|
|
223
264
|
if (name == null || name === '') {
|
|
224
265
|
_reportError(
|