@grouplinknetwork/rn-grouplink-sdk 2.5.1 → 2.7.0-beta.1

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.
Files changed (52) hide show
  1. package/README.md +0 -12
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/grouplinksdk/GrouplinkSdkModule.java +46 -0
  4. package/grouplink-sdk.podspec +5 -1
  5. package/ios/Frameworks/GroupLink.xcframework/Info.plist +44 -0
  6. package/ios/Frameworks/GroupLink.xcframework/_CodeSignature/CodeDirectory +0 -0
  7. package/ios/Frameworks/GroupLink.xcframework/_CodeSignature/CodeRequirements +0 -0
  8. package/ios/Frameworks/GroupLink.xcframework/_CodeSignature/CodeResources +574 -0
  9. package/ios/Frameworks/GroupLink.xcframework/_CodeSignature/CodeSignature +0 -0
  10. package/ios/Frameworks/GroupLink.xcframework/ios-arm64/GroupLink.framework/GroupLink +0 -0
  11. package/ios/Frameworks/GroupLink.xcframework/ios-arm64/GroupLink.framework/Headers/GroupLink-Swift.h +443 -0
  12. package/ios/Frameworks/GroupLink.xcframework/ios-arm64/GroupLink.framework/Headers/GroupLink.h +18 -0
  13. package/ios/Frameworks/GroupLink.xcframework/ios-arm64/GroupLink.framework/Info.plist +0 -0
  14. package/ios/Frameworks/GroupLink.xcframework/ios-arm64/GroupLink.framework/Modules/GroupLink.swiftmodule/arm64-apple-ios.abi.json +6487 -0
  15. package/ios/Frameworks/GroupLink.xcframework/ios-arm64/GroupLink.framework/Modules/GroupLink.swiftmodule/arm64-apple-ios.private.swiftinterface +90 -0
  16. package/ios/Frameworks/GroupLink.xcframework/ios-arm64/GroupLink.framework/Modules/GroupLink.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  17. package/ios/Frameworks/GroupLink.xcframework/ios-arm64/GroupLink.framework/Modules/GroupLink.swiftmodule/arm64-apple-ios.swiftinterface +90 -0
  18. package/ios/Frameworks/GroupLink.xcframework/ios-arm64/GroupLink.framework/Modules/module.modulemap +10 -0
  19. package/ios/Frameworks/GroupLink.xcframework/ios-arm64/GroupLink.framework/PrivacyInfo.xcprivacy +74 -0
  20. package/ios/Frameworks/GroupLink.xcframework/ios-arm64/GroupLink.framework/_CodeSignature/CodeResources +201 -0
  21. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/GroupLink +0 -0
  22. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/Headers/GroupLink-Swift.h +882 -0
  23. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/Headers/GroupLink.h +18 -0
  24. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/Info.plist +0 -0
  25. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/Modules/GroupLink.swiftmodule/arm64-apple-ios-simulator.abi.json +6487 -0
  26. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/Modules/GroupLink.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +90 -0
  27. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/Modules/GroupLink.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  28. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/Modules/GroupLink.swiftmodule/arm64-apple-ios-simulator.swiftinterface +90 -0
  29. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/Modules/GroupLink.swiftmodule/x86_64-apple-ios-simulator.abi.json +6487 -0
  30. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/Modules/GroupLink.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +90 -0
  31. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/Modules/GroupLink.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  32. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/Modules/GroupLink.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +90 -0
  33. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/Modules/module.modulemap +10 -0
  34. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/PrivacyInfo.xcprivacy +74 -0
  35. package/ios/Frameworks/GroupLink.xcframework/ios-arm64_x86_64-simulator/GroupLink.framework/_CodeSignature/CodeResources +256 -0
  36. package/ios/GrouplinkSdk.mm +34 -2
  37. package/ios/GrouplinkSdk.swift +11 -1
  38. package/ios/GrouplinkSdk.xcodeproj/project.xcworkspace/xcuserdata/gabrieltorelo.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  39. package/ios/GrouplinkSdk.xcodeproj/xcuserdata/gabrieltorelo.xcuserdatad/xcschemes/xcschememanagement.plist +8 -0
  40. package/lib/commonjs/NativeGrouplinkSdk.js.map +1 -1
  41. package/lib/commonjs/index.js +63 -13
  42. package/lib/commonjs/index.js.map +1 -1
  43. package/lib/module/NativeGrouplinkSdk.js.map +1 -1
  44. package/lib/module/index.js +61 -13
  45. package/lib/module/index.js.map +1 -1
  46. package/lib/typescript/NativeGrouplinkSdk.d.ts +16 -0
  47. package/lib/typescript/NativeGrouplinkSdk.d.ts.map +1 -1
  48. package/lib/typescript/index.d.ts +26 -3
  49. package/lib/typescript/index.d.ts.map +1 -1
  50. package/package.json +1 -1
  51. package/src/NativeGrouplinkSdk.ts +16 -0
  52. package/src/index.tsx +64 -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.
@@ -29,5 +29,5 @@ repositories {
29
29
 
30
30
  dependencies {
31
31
  implementation "com.facebook.react:react-android"
32
- implementation "com.grouplinknetwork:lib-grouplinknetwork:4.+"
32
+ implementation "com.github.Group-Link-Mobile:lib-grouplinknetwork-beta:4.29.2"
33
33
  }
@@ -19,6 +19,7 @@ import android.os.Handler;
19
19
  import android.os.Looper;
20
20
 
21
21
  import com.grouplinknetwork.GroupLink;
22
+ import com.grouplinknetwork.DeviceKeyListener;
22
23
 
23
24
  // NativeGrouplinkSdkSpec is generated by Codegen from src/NativeGroupLinkSDK.ts.
24
25
  // The exact class name is derived from build.gradle libraryName="GrouplinkSdk"
@@ -60,6 +61,28 @@ public class GrouplinkSdkModule extends NativeGrouplinkSdkSpec implements Lifecy
60
61
  }
61
62
  }
62
63
 
64
+ @Override
65
+ @ReactMethod
66
+ public void getDeviceKeyAndroid(Promise promise) {
67
+ Context context = mReactApplicationContext.getApplicationContext();
68
+ try {
69
+ GroupLink.getDeviceKey(context, new DeviceKeyListener() {
70
+ @Override
71
+ public void onResult(String deviceKey) {
72
+ promise.resolve(deviceKey);
73
+ }
74
+
75
+ @Override
76
+ public void onError(String error) {
77
+ promise.resolve(error);
78
+ }
79
+ });
80
+ } catch (Exception e) {
81
+ e.printStackTrace();
82
+ promise.reject("Device Key not available yet", e.getMessage());
83
+ }
84
+ }
85
+
63
86
  @Override
64
87
  @ReactMethod
65
88
  public void startAndroid(String token, boolean debbugable) {
@@ -102,6 +125,17 @@ public class GrouplinkSdkModule extends NativeGrouplinkSdkSpec implements Lifecy
102
125
  }
103
126
  }
104
127
 
128
+ @Override
129
+ @ReactMethod
130
+ public void setRemoteId(String remoteId) {
131
+ try {
132
+ Context context = mReactApplicationContext.getApplicationContext();
133
+ GroupLink.setRemoteId(context, remoteId);
134
+ } catch (Exception e) {
135
+ Log.e("setRemoteId", "Failed: " + e.getMessage());
136
+ }
137
+ }
138
+
105
139
  @Override
106
140
  @ReactMethod
107
141
  public void setNotificationNameAndroid(String notificationName) {
@@ -152,6 +186,12 @@ public class GrouplinkSdkModule extends NativeGrouplinkSdkSpec implements Lifecy
152
186
  promise.reject("unsupported", "getUserID is iOS only");
153
187
  }
154
188
 
189
+ @Override
190
+ @ReactMethod
191
+ public void getDeviceKeyIOS(Promise promise) {
192
+ promise.reject("unsupported", "getDeviceKeyIOS is iOS only");
193
+ }
194
+
155
195
  @Override
156
196
  @ReactMethod
157
197
  public void setDevicePushToken(String withPushToken) {
@@ -164,6 +204,12 @@ public class GrouplinkSdkModule extends NativeGrouplinkSdkSpec implements Lifecy
164
204
  // iOS only
165
205
  }
166
206
 
207
+ @Override
208
+ @ReactMethod
209
+ public void setRemoteIdIOS(String remoteId) {
210
+ // iOS only
211
+ }
212
+
167
213
  @Override
168
214
  @ReactMethod
169
215
  public void startBluetoothIOS() {
@@ -16,7 +16,11 @@ Pod::Spec.new do |s|
16
16
 
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
- s.dependency "GroupLinkSDK", "~> 5"
19
+ # ---- SDK Manual implementation ----
20
+ s.vendored_frameworks = "ios/Frameworks/GroupLink.xcframework"
21
+ # -----------------------------------
22
+
23
+ # s.dependency "GroupLinkSDK", "~> 6.2.0"
20
24
  s.dependency "React-Core"
21
25
 
22
26
  # Don't install the dependencies when we run `pod install` in the old architecture.
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>AvailableLibraries</key>
6
+ <array>
7
+ <dict>
8
+ <key>BinaryPath</key>
9
+ <string>GroupLink.framework/GroupLink</string>
10
+ <key>LibraryIdentifier</key>
11
+ <string>ios-arm64</string>
12
+ <key>LibraryPath</key>
13
+ <string>GroupLink.framework</string>
14
+ <key>SupportedArchitectures</key>
15
+ <array>
16
+ <string>arm64</string>
17
+ </array>
18
+ <key>SupportedPlatform</key>
19
+ <string>ios</string>
20
+ </dict>
21
+ <dict>
22
+ <key>BinaryPath</key>
23
+ <string>GroupLink.framework/GroupLink</string>
24
+ <key>LibraryIdentifier</key>
25
+ <string>ios-arm64_x86_64-simulator</string>
26
+ <key>LibraryPath</key>
27
+ <string>GroupLink.framework</string>
28
+ <key>SupportedArchitectures</key>
29
+ <array>
30
+ <string>arm64</string>
31
+ <string>x86_64</string>
32
+ </array>
33
+ <key>SupportedPlatform</key>
34
+ <string>ios</string>
35
+ <key>SupportedPlatformVariant</key>
36
+ <string>simulator</string>
37
+ </dict>
38
+ </array>
39
+ <key>CFBundlePackageType</key>
40
+ <string>XFWK</string>
41
+ <key>XCFrameworkFormatVersion</key>
42
+ <string>1.0</string>
43
+ </dict>
44
+ </plist>