@stream-io/video-react-native-sdk 1.30.5 → 1.31.1-beta.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.
Files changed (248) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/android/src/main/AndroidManifest.xml +8 -1
  3. package/android/src/main/AndroidManifestNew.xml +11 -0
  4. package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNativeModule.kt +127 -5
  5. package/android/src/main/java/com/streamvideo/reactnative/audio/utils/WebRtcAudioUtils.kt +70 -6
  6. package/android/src/main/java/com/streamvideo/reactnative/callmanager/StreamInCallManagerModule.kt +6 -4
  7. package/android/src/main/java/com/streamvideo/reactnative/keepalive/KeepAliveNotification.kt +83 -0
  8. package/android/src/main/java/com/streamvideo/reactnative/keepalive/StreamCallKeepAliveHeadlessService.kt +149 -0
  9. package/android/src/main/java/com/streamvideo/reactnative/screenshare/ScreenAudioCapture.kt +111 -0
  10. package/dist/commonjs/components/Call/CallControls/ScreenShareToggleButton.js +3 -2
  11. package/dist/commonjs/components/Call/CallControls/ScreenShareToggleButton.js.map +1 -1
  12. package/dist/commonjs/hooks/index.js +11 -0
  13. package/dist/commonjs/hooks/index.js.map +1 -1
  14. package/dist/commonjs/hooks/push/index.js +0 -2
  15. package/dist/commonjs/hooks/push/index.js.map +1 -1
  16. package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js +144 -0
  17. package/dist/commonjs/hooks/push/useCallingExpWithCallingStateEffect.js.map +1 -0
  18. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js +18 -31
  19. package/dist/commonjs/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  20. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js +64 -97
  21. package/dist/commonjs/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  22. package/dist/commonjs/hooks/useScreenShareAudioMixing.js +126 -0
  23. package/dist/commonjs/hooks/useScreenShareAudioMixing.js.map +1 -0
  24. package/dist/commonjs/hooks/useScreenShareButton.js +57 -3
  25. package/dist/commonjs/hooks/useScreenShareButton.js.map +1 -1
  26. package/dist/commonjs/index.js +1 -0
  27. package/dist/commonjs/index.js.map +1 -1
  28. package/dist/commonjs/modules/ScreenShareAudioManager.js +54 -0
  29. package/dist/commonjs/modules/ScreenShareAudioManager.js.map +1 -0
  30. package/dist/commonjs/modules/call-manager/CallManager.js +26 -0
  31. package/dist/commonjs/modules/call-manager/CallManager.js.map +1 -1
  32. package/dist/commonjs/providers/StreamCall/index.js +16 -6
  33. package/dist/commonjs/providers/StreamCall/index.js.map +1 -1
  34. package/dist/commonjs/utils/StreamVideoRN/index.js +35 -21
  35. package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
  36. package/dist/commonjs/utils/internal/callingx/audioSessionPromise.js +68 -0
  37. package/dist/commonjs/utils/internal/callingx/audioSessionPromise.js.map +1 -0
  38. package/dist/commonjs/utils/internal/callingx/callingx.js +150 -0
  39. package/dist/commonjs/utils/internal/callingx/callingx.js.map +1 -0
  40. package/dist/commonjs/utils/internal/registerSDKGlobals.js +53 -3
  41. package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
  42. package/dist/commonjs/utils/keepCallAliveHeadlessTask.js +48 -0
  43. package/dist/commonjs/utils/keepCallAliveHeadlessTask.js.map +1 -0
  44. package/dist/commonjs/utils/push/android.js +135 -202
  45. package/dist/commonjs/utils/push/android.js.map +1 -1
  46. package/dist/commonjs/utils/push/internal/ios.js +17 -34
  47. package/dist/commonjs/utils/push/internal/ios.js.map +1 -1
  48. package/dist/commonjs/utils/push/internal/rxSubjects.js +1 -45
  49. package/dist/commonjs/utils/push/internal/rxSubjects.js.map +1 -1
  50. package/dist/commonjs/utils/push/internal/utils.js +71 -53
  51. package/dist/commonjs/utils/push/internal/utils.js.map +1 -1
  52. package/dist/commonjs/utils/push/ios.js.map +1 -1
  53. package/dist/commonjs/utils/push/libs/callingx.js +75 -0
  54. package/dist/commonjs/utils/push/libs/callingx.js.map +1 -0
  55. package/dist/commonjs/utils/push/libs/index.js +8 -19
  56. package/dist/commonjs/utils/push/libs/index.js.map +1 -1
  57. package/dist/commonjs/utils/push/libs/notifee/index.js +0 -19
  58. package/dist/commonjs/utils/push/libs/notifee/index.js.map +1 -1
  59. package/dist/commonjs/utils/push/setupCallingExpEvents.js +105 -0
  60. package/dist/commonjs/utils/push/setupCallingExpEvents.js.map +1 -0
  61. package/dist/commonjs/utils/push/setupIosVoipPushEvents.js +7 -6
  62. package/dist/commonjs/utils/push/setupIosVoipPushEvents.js.map +1 -1
  63. package/dist/commonjs/version.js +1 -1
  64. package/dist/commonjs/version.js.map +1 -1
  65. package/dist/module/components/Call/CallControls/ScreenShareToggleButton.js +3 -2
  66. package/dist/module/components/Call/CallControls/ScreenShareToggleButton.js.map +1 -1
  67. package/dist/module/hooks/index.js +1 -0
  68. package/dist/module/hooks/index.js.map +1 -1
  69. package/dist/module/hooks/push/index.js +0 -2
  70. package/dist/module/hooks/push/index.js.map +1 -1
  71. package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js +137 -0
  72. package/dist/module/hooks/push/useCallingExpWithCallingStateEffect.js.map +1 -0
  73. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js +18 -31
  74. package/dist/module/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
  75. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js +66 -99
  76. package/dist/module/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
  77. package/dist/module/hooks/useScreenShareAudioMixing.js +119 -0
  78. package/dist/module/hooks/useScreenShareAudioMixing.js.map +1 -0
  79. package/dist/module/hooks/useScreenShareButton.js +57 -3
  80. package/dist/module/hooks/useScreenShareButton.js.map +1 -1
  81. package/dist/module/index.js +1 -0
  82. package/dist/module/index.js.map +1 -1
  83. package/dist/module/modules/ScreenShareAudioManager.js +47 -0
  84. package/dist/module/modules/ScreenShareAudioManager.js.map +1 -0
  85. package/dist/module/modules/call-manager/CallManager.js +26 -0
  86. package/dist/module/modules/call-manager/CallManager.js.map +1 -1
  87. package/dist/module/providers/StreamCall/index.js +16 -6
  88. package/dist/module/providers/StreamCall/index.js.map +1 -1
  89. package/dist/module/utils/StreamVideoRN/index.js +35 -21
  90. package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
  91. package/dist/module/utils/internal/callingx/audioSessionPromise.js +61 -0
  92. package/dist/module/utils/internal/callingx/audioSessionPromise.js.map +1 -0
  93. package/dist/module/utils/internal/callingx/callingx.js +140 -0
  94. package/dist/module/utils/internal/callingx/callingx.js.map +1 -0
  95. package/dist/module/utils/internal/registerSDKGlobals.js +53 -3
  96. package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
  97. package/dist/module/utils/keepCallAliveHeadlessTask.js +42 -0
  98. package/dist/module/utils/keepCallAliveHeadlessTask.js.map +1 -0
  99. package/dist/module/utils/push/android.js +137 -204
  100. package/dist/module/utils/push/android.js.map +1 -1
  101. package/dist/module/utils/push/internal/ios.js +17 -34
  102. package/dist/module/utils/push/internal/ios.js.map +1 -1
  103. package/dist/module/utils/push/internal/rxSubjects.js +0 -44
  104. package/dist/module/utils/push/internal/rxSubjects.js.map +1 -1
  105. package/dist/module/utils/push/internal/utils.js +67 -50
  106. package/dist/module/utils/push/internal/utils.js.map +1 -1
  107. package/dist/module/utils/push/ios.js.map +1 -1
  108. package/dist/module/utils/push/libs/callingx.js +67 -0
  109. package/dist/module/utils/push/libs/callingx.js.map +1 -0
  110. package/dist/module/utils/push/libs/index.js +1 -2
  111. package/dist/module/utils/push/libs/index.js.map +1 -1
  112. package/dist/module/utils/push/libs/notifee/index.js +0 -18
  113. package/dist/module/utils/push/libs/notifee/index.js.map +1 -1
  114. package/dist/module/utils/push/setupCallingExpEvents.js +99 -0
  115. package/dist/module/utils/push/setupCallingExpEvents.js.map +1 -0
  116. package/dist/module/utils/push/setupIosVoipPushEvents.js +7 -6
  117. package/dist/module/utils/push/setupIosVoipPushEvents.js.map +1 -1
  118. package/dist/module/version.js +1 -1
  119. package/dist/module/version.js.map +1 -1
  120. package/dist/typescript/components/Call/CallControls/ScreenShareToggleButton.d.ts +6 -1
  121. package/dist/typescript/components/Call/CallControls/ScreenShareToggleButton.d.ts.map +1 -1
  122. package/dist/typescript/hooks/index.d.ts +1 -0
  123. package/dist/typescript/hooks/index.d.ts.map +1 -1
  124. package/dist/typescript/hooks/push/index.d.ts.map +1 -1
  125. package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts +5 -0
  126. package/dist/typescript/hooks/push/useCallingExpWithCallingStateEffect.d.ts.map +1 -0
  127. package/dist/typescript/hooks/push/useIosVoipPushEventsSetupEffect.d.ts.map +1 -1
  128. package/dist/typescript/hooks/useAndroidKeepCallAliveEffect.d.ts.map +1 -1
  129. package/dist/typescript/hooks/useScreenShareAudioMixing.d.ts +14 -0
  130. package/dist/typescript/hooks/useScreenShareAudioMixing.d.ts.map +1 -0
  131. package/dist/typescript/hooks/useScreenShareButton.d.ts +39 -2
  132. package/dist/typescript/hooks/useScreenShareButton.d.ts.map +1 -1
  133. package/dist/typescript/index.d.ts +1 -0
  134. package/dist/typescript/index.d.ts.map +1 -1
  135. package/dist/typescript/modules/ScreenShareAudioManager.d.ts +28 -0
  136. package/dist/typescript/modules/ScreenShareAudioManager.d.ts.map +1 -0
  137. package/dist/typescript/modules/call-manager/CallManager.d.ts +5 -0
  138. package/dist/typescript/modules/call-manager/CallManager.d.ts.map +1 -1
  139. package/dist/typescript/providers/StreamCall/index.d.ts.map +1 -1
  140. package/dist/typescript/utils/StreamVideoRN/index.d.ts +22 -2
  141. package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
  142. package/dist/typescript/utils/StreamVideoRN/types.d.ts +59 -25
  143. package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
  144. package/dist/typescript/utils/internal/callingx/audioSessionPromise.d.ts +16 -0
  145. package/dist/typescript/utils/internal/callingx/audioSessionPromise.d.ts.map +1 -0
  146. package/dist/typescript/utils/internal/callingx/callingx.d.ts +18 -0
  147. package/dist/typescript/utils/internal/callingx/callingx.d.ts.map +1 -0
  148. package/dist/typescript/utils/internal/registerSDKGlobals.d.ts.map +1 -1
  149. package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts +10 -0
  150. package/dist/typescript/utils/keepCallAliveHeadlessTask.d.ts.map +1 -0
  151. package/dist/typescript/utils/push/android.d.ts +1 -2
  152. package/dist/typescript/utils/push/android.d.ts.map +1 -1
  153. package/dist/typescript/utils/push/internal/ios.d.ts.map +1 -1
  154. package/dist/typescript/utils/push/internal/rxSubjects.d.ts +0 -33
  155. package/dist/typescript/utils/push/internal/rxSubjects.d.ts.map +1 -1
  156. package/dist/typescript/utils/push/internal/utils.d.ts +14 -8
  157. package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
  158. package/dist/typescript/utils/push/ios.d.ts +1 -2
  159. package/dist/typescript/utils/push/ios.d.ts.map +1 -1
  160. package/dist/typescript/utils/push/libs/callingx.d.ts +9 -0
  161. package/dist/typescript/utils/push/libs/callingx.d.ts.map +1 -0
  162. package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts +16 -2
  163. package/dist/typescript/utils/push/libs/firebaseMessaging/index.d.ts.map +1 -1
  164. package/dist/typescript/utils/push/libs/index.d.ts +1 -2
  165. package/dist/typescript/utils/push/libs/index.d.ts.map +1 -1
  166. package/dist/typescript/utils/push/libs/notifee/index.d.ts +0 -1
  167. package/dist/typescript/utils/push/libs/notifee/index.d.ts.map +1 -1
  168. package/dist/typescript/utils/push/setupCallingExpEvents.d.ts +8 -0
  169. package/dist/typescript/utils/push/setupCallingExpEvents.d.ts.map +1 -0
  170. package/dist/typescript/utils/push/setupIosVoipPushEvents.d.ts.map +1 -1
  171. package/dist/typescript/version.d.ts +1 -1
  172. package/dist/typescript/version.d.ts.map +1 -1
  173. package/expo-config-plugin/dist/withAndroidManifest.js +1 -33
  174. package/expo-config-plugin/dist/withAndroidPermissions.js +2 -7
  175. package/expo-config-plugin/dist/withAppDelegate.js +19 -197
  176. package/expo-config-plugin/dist/withMainActivity.js +1 -1
  177. package/expo-config-plugin/dist/withiOSInfoPlist.js +2 -3
  178. package/ios/StreamInCallManager.m +2 -0
  179. package/ios/StreamInCallManager.swift +19 -7
  180. package/ios/StreamVideoReactNative.h +7 -4
  181. package/ios/StreamVideoReactNative.m +282 -86
  182. package/package.json +13 -18
  183. package/src/components/Call/CallControls/ScreenShareToggleButton.tsx +11 -1
  184. package/src/hooks/index.ts +1 -0
  185. package/src/hooks/push/index.ts +0 -2
  186. package/src/hooks/push/useCallingExpWithCallingStateEffect.ts +189 -0
  187. package/src/hooks/push/useIosVoipPushEventsSetupEffect.ts +21 -34
  188. package/src/hooks/useAndroidKeepCallAliveEffect.ts +94 -120
  189. package/src/hooks/useScreenShareAudioMixing.ts +130 -0
  190. package/src/hooks/useScreenShareButton.ts +87 -2
  191. package/src/index.ts +1 -0
  192. package/src/modules/ScreenShareAudioManager.ts +49 -0
  193. package/src/modules/call-manager/CallManager.ts +36 -0
  194. package/src/modules/call-manager/native-module.d.ts +7 -0
  195. package/src/providers/StreamCall/index.tsx +17 -6
  196. package/src/utils/StreamVideoRN/index.ts +42 -30
  197. package/src/utils/StreamVideoRN/types.ts +61 -25
  198. package/src/utils/internal/callingx/audioSessionPromise.ts +65 -0
  199. package/src/utils/internal/callingx/callingx.ts +194 -0
  200. package/src/utils/internal/registerSDKGlobals.ts +52 -4
  201. package/src/utils/keepCallAliveHeadlessTask.ts +54 -0
  202. package/src/utils/push/android.ts +198 -311
  203. package/src/utils/push/internal/ios.ts +28 -44
  204. package/src/utils/push/internal/rxSubjects.ts +0 -61
  205. package/src/utils/push/internal/utils.ts +108 -64
  206. package/src/utils/push/ios.ts +1 -6
  207. package/src/utils/push/libs/callingx.ts +89 -0
  208. package/src/utils/push/libs/index.ts +1 -2
  209. package/src/utils/push/libs/notifee/index.ts +0 -27
  210. package/src/utils/push/setupCallingExpEvents.ts +135 -0
  211. package/src/utils/push/setupIosVoipPushEvents.ts +11 -7
  212. package/src/version.ts +1 -1
  213. package/android/src/main/java/com/streamvideo/reactnative/util/CallAliveServiceChecker.kt +0 -95
  214. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js +0 -160
  215. package/dist/commonjs/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +0 -1
  216. package/dist/commonjs/hooks/push/useProcessPushCallEffect.js +0 -67
  217. package/dist/commonjs/hooks/push/useProcessPushCallEffect.js.map +0 -1
  218. package/dist/commonjs/utils/push/libs/callkeep.js +0 -17
  219. package/dist/commonjs/utils/push/libs/callkeep.js.map +0 -1
  220. package/dist/commonjs/utils/push/libs/voipPushNotification.js +0 -17
  221. package/dist/commonjs/utils/push/libs/voipPushNotification.js.map +0 -1
  222. package/dist/commonjs/utils/push/setupIosCallKeepEvents.js +0 -205
  223. package/dist/commonjs/utils/push/setupIosCallKeepEvents.js.map +0 -1
  224. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js +0 -153
  225. package/dist/module/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +0 -1
  226. package/dist/module/hooks/push/useProcessPushCallEffect.js +0 -60
  227. package/dist/module/hooks/push/useProcessPushCallEffect.js.map +0 -1
  228. package/dist/module/utils/push/libs/callkeep.js +0 -11
  229. package/dist/module/utils/push/libs/callkeep.js.map +0 -1
  230. package/dist/module/utils/push/libs/voipPushNotification.js +0 -11
  231. package/dist/module/utils/push/libs/voipPushNotification.js.map +0 -1
  232. package/dist/module/utils/push/setupIosCallKeepEvents.js +0 -199
  233. package/dist/module/utils/push/setupIosCallKeepEvents.js.map +0 -1
  234. package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts +0 -5
  235. package/dist/typescript/hooks/push/useIosCallkeepWithCallingStateEffect.d.ts.map +0 -1
  236. package/dist/typescript/hooks/push/useProcessPushCallEffect.d.ts +0 -8
  237. package/dist/typescript/hooks/push/useProcessPushCallEffect.d.ts.map +0 -1
  238. package/dist/typescript/utils/push/libs/callkeep.d.ts +0 -3
  239. package/dist/typescript/utils/push/libs/callkeep.d.ts.map +0 -1
  240. package/dist/typescript/utils/push/libs/voipPushNotification.d.ts +0 -3
  241. package/dist/typescript/utils/push/libs/voipPushNotification.d.ts.map +0 -1
  242. package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts +0 -6
  243. package/dist/typescript/utils/push/setupIosCallKeepEvents.d.ts.map +0 -1
  244. package/src/hooks/push/useIosCallkeepWithCallingStateEffect.ts +0 -235
  245. package/src/hooks/push/useProcessPushCallEffect.ts +0 -108
  246. package/src/utils/push/libs/callkeep.ts +0 -16
  247. package/src/utils/push/libs/voipPushNotification.ts +0 -17
  248. package/src/utils/push/setupIosCallKeepEvents.ts +0 -252
@@ -4,22 +4,27 @@
4
4
  #import <React/RCTUIManagerUtils.h>
5
5
  #import <UIKit/UIKit.h>
6
6
  #import <CallKit/CallKit.h>
7
+ #import <PushKit/PushKit.h>
7
8
  #import "StreamVideoReactNative.h"
8
9
  #import "WebRTCModule.h"
9
10
  #import "WebRTCModuleOptions.h"
11
+ #import "InAppScreenCapturer.h"
10
12
  #import <AVFoundation/AVFoundation.h>
11
13
  #import <AudioToolbox/AudioToolbox.h>
12
14
 
15
+ // Import Swift-generated header for ScreenShareAudioMixer
16
+ #if __has_include(<stream_react_native_webrtc/stream_react_native_webrtc-Swift.h>)
17
+ #import <stream_react_native_webrtc/stream_react_native_webrtc-Swift.h>
18
+ #elif __has_include("stream_react_native_webrtc-Swift.h")
19
+ #import "stream_react_native_webrtc-Swift.h"
20
+ #endif
21
+
13
22
  // Do not change these consts, it is what is used react-native-webrtc
14
23
  NSNotificationName const kBroadcastStartedNotification = @"iOS_BroadcastStarted";
15
24
  NSNotificationName const kBroadcastStoppedNotification = @"iOS_BroadcastStopped";
16
25
 
17
- static NSMutableDictionary *_incomingCallUUIDsByCallID = nil;
18
- static NSMutableDictionary *_incomingCallCidsByUUID = nil;
19
26
  static dispatch_queue_t _dictionaryQueue = nil;
20
27
 
21
- static BOOL _shouldRejectCallWhenBusy = NO;
22
-
23
28
  void broadcastNotificationCallback(CFNotificationCenterRef center,
24
29
  void *observer,
25
30
  CFStringRef name,
@@ -60,11 +65,196 @@ RCT_EXPORT_MODULE();
60
65
  static dispatch_once_t onceToken;
61
66
  dispatch_once(&onceToken, ^{
62
67
  _dictionaryQueue = dispatch_queue_create("com.stream.video.dictionary", DISPATCH_QUEUE_SERIAL);
63
- _incomingCallUUIDsByCallID = [NSMutableDictionary dictionary];
64
- _incomingCallCidsByUUID = [NSMutableDictionary dictionary];
65
68
  });
66
69
  }
67
70
 
71
+ +(BOOL)canRegisterCall {
72
+ Class callingxClass = NSClassFromString(@"Callingx");
73
+ if (!callingxClass) {
74
+ #if DEBUG
75
+ NSLog(@"[StreamVideoReactNative][canRegisterCall] Callingx not available");
76
+ #endif
77
+ return YES;
78
+ }
79
+
80
+ SEL selector = @selector(canRegisterCall);
81
+ if (![callingxClass respondsToSelector:selector]) {
82
+ #if DEBUG
83
+ NSLog(@"[StreamVideoReactNative][canRegisterCall] Callingx does not respond to canRegisterCall selector");
84
+ #endif
85
+ return YES;
86
+ }
87
+
88
+ NSMethodSignature *signature = [callingxClass methodSignatureForSelector:selector];
89
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
90
+ [invocation setTarget:callingxClass];
91
+ [invocation setSelector:selector];
92
+ [invocation invoke];
93
+
94
+ BOOL canRegister = NO;
95
+ [invocation getReturnValue:&canRegister];
96
+
97
+ #if DEBUG
98
+ NSLog(@"[StreamVideoReactNative][canRegisterCall] canRegisterCall = %@", canRegister ? @"YES" : @"NO");
99
+ #endif
100
+
101
+ return canRegister;
102
+ }
103
+
104
+ +(void)voipRegistration {
105
+ Class voipManagerClass = NSClassFromString(@"Callingx.VoipNotificationsManager");
106
+ if (!voipManagerClass) {
107
+ // Fallback: Try the unmangled name (might work depending on Swift version)
108
+ voipManagerClass = NSClassFromString(@"VoipNotificationsManager");
109
+ }
110
+
111
+ if (!voipManagerClass) {
112
+ #if DEBUG
113
+ NSLog(@"[StreamVideoReactNative][voipRegistration] VoipNotificationsManager not available");
114
+ #endif
115
+ return;
116
+ }
117
+
118
+ SEL selector = @selector(voipRegistration);
119
+ if (![voipManagerClass respondsToSelector:selector]) {
120
+ #if DEBUG
121
+ NSLog(@"[StreamVideoReactNative][voipRegistration] VoipNotificationsManager does not respond to voipRegistration");
122
+ #endif
123
+ return;
124
+ }
125
+
126
+ [voipManagerClass voipRegistration];
127
+ }
128
+
129
+ +(void)didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(NSString *)type {
130
+ Class voipManagerClass = NSClassFromString(@"Callingx.VoipNotificationsManager");
131
+ if (!voipManagerClass) {
132
+ // Fallback: Try the unmangled name (might work depending on Swift version)
133
+ voipManagerClass = NSClassFromString(@"VoipNotificationsManager");
134
+ }
135
+
136
+ if (!voipManagerClass) {
137
+ #if DEBUG
138
+ NSLog(@"[StreamVideoReactNative][didUpdatePushCredentials] VoipNotificationsManager not available");
139
+ #endif
140
+ return;
141
+ }
142
+
143
+ SEL selector = @selector(didUpdatePushCredentials:forType:);
144
+ if (![voipManagerClass respondsToSelector:selector]) {
145
+ #if DEBUG
146
+ NSLog(@"[StreamVideoReactNative][didUpdatePushCredentials] VoipNotificationsManager does not respond to didUpdatePushCredentials:forType:");
147
+ #endif
148
+ return;
149
+ }
150
+
151
+ [voipManagerClass didUpdatePushCredentials:credentials forType:type];
152
+ }
153
+
154
+ +(void)didReceiveIncomingPush:(PKPushPayload *)payload forType:(NSString *)type completionHandler: (void (^_Nullable)(void)) completion {
155
+ NSDictionary *streamPayload = payload.dictionaryPayload[@"stream"];
156
+ if (!streamPayload) {
157
+ #if DEBUG
158
+ NSLog(@"[StreamVideoReactNative][didReceiveIncomingPush] Stream payload not found");
159
+ #endif
160
+ if (completion) {
161
+ completion();
162
+ }
163
+ return;
164
+ }
165
+
166
+ NSString *createdCallerName = streamPayload[@"created_by_display_name"];
167
+ NSString *callCid = streamPayload[@"call_cid"];
168
+ if (!createdCallerName || !callCid) {
169
+ #if DEBUG
170
+ NSLog(@"[StreamVideoReactNative][didReceiveIncomingPush] Missing required fields: created_by_display_name or call_cid");
171
+ #endif
172
+ if (completion) {
173
+ completion();
174
+ }
175
+ return;
176
+ }
177
+
178
+ if (![StreamVideoReactNative canRegisterCall]) {
179
+ if (completion) {
180
+ completion();
181
+ }
182
+ return;
183
+ }
184
+
185
+ [StreamVideoReactNative reportNewIncomingCall:streamPayload forType:type completionHandler:completion];
186
+ [StreamVideoReactNative didReceiveIncomingPushWithPayload:payload forType:type];
187
+ }
188
+
189
+ +(void)reportNewIncomingCall:(NSDictionary *)streamPayload forType:(NSString *)type completionHandler: (void (^_Nullable)(void)) completion {
190
+ Class callingxClass = NSClassFromString(@"Callingx");
191
+ if (!callingxClass) {
192
+ NSLog(@"[StreamVideoReactNative][didReceiveIncomingPush] Callingx not available");
193
+ return;
194
+ }
195
+
196
+ SEL selector = @selector(reportNewIncomingCall:handle:handleType:hasVideo:localizedCallerName:supportsHolding:supportsDTMF:supportsGrouping:supportsUngrouping:payload:withCompletionHandler:);
197
+ if (![callingxClass respondsToSelector:selector]) {
198
+ #if DEBUG
199
+ NSLog(@"[StreamVideoReactNative][didReceiveIncomingPush] Callingx does not respond to selector");
200
+ #endif
201
+ return;
202
+ }
203
+
204
+ NSString *callCid = streamPayload[@"call_cid"];
205
+ NSString *createdCallerName = streamPayload[@"created_by_display_name"];
206
+ NSString *videoIncluded = streamPayload[@"video"];
207
+ BOOL hasVideo = [videoIncluded isEqualToString:@"false"] ? NO : YES;
208
+ NSString *handleType = @"generic";
209
+ BOOL supportsHolding = NO;
210
+ BOOL supportsDTMF = NO;
211
+ BOOL supportsGrouping = NO;
212
+ BOOL supportsUngrouping = NO;
213
+ void (^completionHandler)(void) = completion;
214
+
215
+ NSMethodSignature *signature = [callingxClass methodSignatureForSelector:selector];
216
+ NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
217
+ [invocation setTarget:callingxClass];
218
+ [invocation setSelector:selector];
219
+ [invocation setArgument:&callCid atIndex:2];
220
+ [invocation setArgument:&createdCallerName atIndex:3];
221
+ [invocation setArgument:&handleType atIndex:4];
222
+ [invocation setArgument:&hasVideo atIndex:5];
223
+ [invocation setArgument:&createdCallerName atIndex:6];
224
+ [invocation setArgument:&supportsHolding atIndex:7];
225
+ [invocation setArgument:&supportsDTMF atIndex:8];
226
+ [invocation setArgument:&supportsGrouping atIndex:9];
227
+ [invocation setArgument:&supportsUngrouping atIndex:10];
228
+ [invocation setArgument:&streamPayload atIndex:11];
229
+ [invocation setArgument:&completionHandler atIndex:12];
230
+ [invocation invoke];
231
+ }
232
+
233
+ +(void)didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(NSString *)type {
234
+ Class voipManagerClass = NSClassFromString(@"Callingx.VoipNotificationsManager");
235
+ if (!voipManagerClass) {
236
+ // Fallback: Try the unmangled name (might work depending on Swift version)
237
+ voipManagerClass = NSClassFromString(@"VoipNotificationsManager");
238
+ }
239
+
240
+ if (!voipManagerClass) {
241
+ #if DEBUG
242
+ NSLog(@"[StreamVideoReactNative][didReceiveIncomingPushWithPayload] VoipNotificationsManager not available");
243
+ #endif
244
+ return;
245
+ }
246
+
247
+ SEL selector = @selector(didReceiveIncomingPushWithPayload:forType:);
248
+ if (![voipManagerClass respondsToSelector:selector]) {
249
+ #if DEBUG
250
+ NSLog(@"[StreamVideoReactNative][didReceiveIncomingPushWithPayload] VoipNotificationsManager does not respond to didReceiveIncomingPushWithPayload:forType:");
251
+ #endif
252
+ return;
253
+ }
254
+
255
+ [voipManagerClass didReceiveIncomingPushWithPayload:payload forType:type];
256
+ }
257
+
68
258
  -(instancetype)init {
69
259
  if ((self = [super init])) {
70
260
  _notificationCenter = CFNotificationCenterGetDarwinNotifyCenter();
@@ -191,71 +381,6 @@ RCT_EXPORT_METHOD(currentThermalState:(RCTPromiseResolveBlock)resolve rejecter:(
191
381
  }
192
382
  }
193
383
 
194
- +(void)registerIncomingCall:(NSString *)cid uuid:(NSString *)uuid {
195
- [StreamVideoReactNative initializeSharedDictionaries];
196
- dispatch_sync(_dictionaryQueue, ^{
197
-
198
- #ifdef DEBUG
199
- NSLog(@"registerIncomingCall cid:%@ -> uuid:%@",cid,uuid);
200
- #endif
201
- NSString *lowercaseUUID = [uuid lowercaseString];
202
- _incomingCallUUIDsByCallID[cid] = lowercaseUUID;
203
- _incomingCallCidsByUUID[lowercaseUUID] = cid;
204
- });
205
- }
206
-
207
- RCT_EXPORT_METHOD(getIncomingCallUUid:(NSString *)cid
208
- resolver:(RCTPromiseResolveBlock)resolve
209
- rejecter:(RCTPromiseRejectBlock)reject)
210
- {
211
- dispatch_sync(_dictionaryQueue, ^{
212
- NSString *uuid = _incomingCallUUIDsByCallID[cid];
213
- if (uuid) {
214
- resolve(uuid);
215
- } else {
216
- NSString *errorString = [NSString stringWithFormat:@"requested incoming call not found for cid: %@", cid];
217
- reject(@"access_failure", errorString, nil);
218
- }
219
- });
220
- }
221
-
222
- RCT_EXPORT_METHOD(getIncomingCallCid:(NSString *)uuid
223
- resolver:(RCTPromiseResolveBlock)resolve
224
- rejecter:(RCTPromiseRejectBlock)reject)
225
- {
226
- dispatch_sync(_dictionaryQueue, ^{
227
- NSString *lowercaseUUID = [uuid lowercaseString];
228
- NSString *foundCid = _incomingCallCidsByUUID[lowercaseUUID];
229
-
230
- if (foundCid) {
231
- resolve(foundCid);
232
- } else {
233
- NSString *errorString = [NSString stringWithFormat:@"requested incoming call not found for uuid: %@", uuid];
234
- reject(@"access_failure", errorString, nil);
235
- }
236
- });
237
- }
238
-
239
- RCT_EXPORT_METHOD(removeIncomingCall:(NSString *)cid
240
- resolver:(RCTPromiseResolveBlock)resolve
241
- rejecter:(RCTPromiseRejectBlock)reject)
242
- {
243
- dispatch_sync(_dictionaryQueue, ^{
244
- NSString *uuid = _incomingCallUUIDsByCallID[cid];
245
- if (uuid) {
246
- #ifdef DEBUG
247
- NSLog(@"removeIncomingCall cid:%@ -> uuid:%@",cid,uuid);
248
- #endif
249
-
250
- [_incomingCallUUIDsByCallID removeObjectForKey:cid];
251
- [_incomingCallCidsByUUID removeObjectForKey:uuid];
252
- resolve(@YES);
253
- } else {
254
- resolve(@NO);
255
- }
256
- });
257
- }
258
-
259
384
  RCT_EXPORT_METHOD(captureRef:(nonnull NSNumber *)reactTag
260
385
  options:(NSDictionary *)options
261
386
  resolver:(RCTPromiseResolveBlock)resolve
@@ -393,17 +518,7 @@ RCT_EXPORT_METHOD(checkPermission:(NSString *)permission
393
518
  ];
394
519
  }
395
520
 
396
- +(BOOL)shouldRejectCallWhenBusy {
397
- return _shouldRejectCallWhenBusy;
398
- }
399
-
400
- RCT_EXPORT_METHOD(setShouldRejectCallWhenBusy:(BOOL)shouldReject) {
401
- _shouldRejectCallWhenBusy = shouldReject;
402
- #ifdef DEBUG
403
- NSLog(@"setShouldRejectCallWhenBusy: %@", shouldReject ? @"YES" : @"NO");
404
- #endif
405
- }
406
-
521
+ //current implementation will return any registered calls not only stream calls
407
522
  + (BOOL)hasAnyActiveCall
408
523
  {
409
524
  CXCallObserver *callObserver = [[CXCallObserver alloc] init];
@@ -626,22 +741,22 @@ RCT_EXPORT_METHOD(stopBusyTone:(RCTPromiseResolveBlock)resolve rejecter:(RCTProm
626
741
 
627
742
  - (void)audioSessionInterrupted:(NSNotification *)notification {
628
743
  AVAudioSessionInterruptionType interruptionType = [notification.userInfo[AVAudioSessionInterruptionTypeKey] unsignedIntegerValue];
629
-
744
+
630
745
  switch (interruptionType) {
631
746
  case AVAudioSessionInterruptionTypeBegan:
632
747
  if (_busyTonePlayer && _busyTonePlayer.isPlaying) {
633
748
  [_busyTonePlayer pause];
634
749
  }
635
750
  break;
636
-
751
+
637
752
  case AVAudioSessionInterruptionTypeEnded: {
638
753
  AVAudioSessionInterruptionOptions options = [notification.userInfo[AVAudioSessionInterruptionOptionKey] unsignedIntegerValue];
639
-
754
+
640
755
  if (options & AVAudioSessionInterruptionOptionShouldResume) {
641
756
  // Reactivate audio session
642
757
  NSError *error = nil;
643
758
  [[AVAudioSession sharedInstance] setActive:YES error:&error];
644
-
759
+
645
760
  if (!error && _busyTonePlayer) {
646
761
  [_busyTonePlayer play];
647
762
  } else if (error) {
@@ -653,4 +768,85 @@ RCT_EXPORT_METHOD(stopBusyTone:(RCTPromiseResolveBlock)resolve rejecter:(RCTProm
653
768
  }
654
769
  }
655
770
 
771
+ #pragma mark - In-App Screen Capture
772
+
773
+ RCT_EXPORT_METHOD(startInAppScreenCapture:(BOOL)includeAudio
774
+ resolve:(RCTPromiseResolveBlock)resolve
775
+ reject:(RCTPromiseRejectBlock)reject)
776
+ {
777
+ WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
778
+ options.useInAppScreenCapture = YES;
779
+ options.includeScreenShareAudio = includeAudio;
780
+ resolve(nil);
781
+ }
782
+
783
+ RCT_EXPORT_METHOD(stopInAppScreenCapture:(RCTPromiseResolveBlock)resolve
784
+ reject:(RCTPromiseRejectBlock)reject)
785
+ {
786
+ WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
787
+ options.useInAppScreenCapture = NO;
788
+ options.includeScreenShareAudio = NO;
789
+ resolve(nil);
790
+ }
791
+
792
+ #pragma mark - Screen Share Audio Mixing
793
+
794
+ RCT_EXPORT_METHOD(startScreenShareAudioMixing:(RCTPromiseResolveBlock)resolve
795
+ reject:(RCTPromiseRejectBlock)reject)
796
+ {
797
+ WebRTCModule *webrtcModule = [self.bridge moduleForClass:[WebRTCModule class]];
798
+ WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
799
+
800
+ ScreenShareAudioMixer *mixer = webrtcModule.audioDeviceModule.screenShareAudioMixer;
801
+
802
+ // Wire mixer as capturePostProcessingDelegate on the audio processing module.
803
+ id<RTCAudioProcessingModule> apmId = options.audioProcessingModule;
804
+ if (apmId && [apmId isKindOfClass:[RTCDefaultAudioProcessingModule class]]) {
805
+ RTCDefaultAudioProcessingModule *apm = (RTCDefaultAudioProcessingModule *)apmId;
806
+ apm.capturePostProcessingDelegate = mixer;
807
+ NSLog(@"[SSAMixer] Set capturePostProcessingDelegate on APM");
808
+ } else {
809
+ NSLog(@"[SSAMixer] WARNING: No RTCDefaultAudioProcessingModule available, mixing will not work");
810
+ }
811
+
812
+ [mixer startMixing];
813
+
814
+ // Wire audio buffer handler on the active capturer → mixer.enqueue
815
+ InAppScreenCapturer *capturer = options.activeInAppScreenCapturer;
816
+ if (capturer) {
817
+ capturer.audioBufferHandler = ^(CMSampleBufferRef sampleBuffer) {
818
+ [mixer enqueue:sampleBuffer];
819
+ };
820
+ }
821
+
822
+ resolve(nil);
823
+ }
824
+
825
+ RCT_EXPORT_METHOD(stopScreenShareAudioMixing:(RCTPromiseResolveBlock)resolve
826
+ reject:(RCTPromiseRejectBlock)reject)
827
+ {
828
+ WebRTCModule *webrtcModule = [self.bridge moduleForClass:[WebRTCModule class]];
829
+ WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
830
+
831
+ // Stop feeding audio to the mixer
832
+ InAppScreenCapturer *capturer = options.activeInAppScreenCapturer;
833
+ if (capturer) {
834
+ capturer.audioBufferHandler = nil;
835
+ }
836
+
837
+ // Stop mixing
838
+ ScreenShareAudioMixer *mixer = webrtcModule.audioDeviceModule.screenShareAudioMixer;
839
+ [mixer stopMixing];
840
+
841
+ // Clear capturePostProcessingDelegate
842
+ id<RTCAudioProcessingModule> apmId = options.audioProcessingModule;
843
+ if (apmId && [apmId isKindOfClass:[RTCDefaultAudioProcessingModule class]]) {
844
+ RTCDefaultAudioProcessingModule *apm = (RTCDefaultAudioProcessingModule *)apmId;
845
+ apm.capturePostProcessingDelegate = nil;
846
+ NSLog(@"[SSAMixer] Cleared capturePostProcessingDelegate on APM");
847
+ }
848
+
849
+ resolve(nil);
850
+ }
851
+
656
852
  @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-native-sdk",
3
- "version": "1.30.5",
3
+ "version": "1.31.1-beta.0",
4
4
  "description": "Stream Video SDK for React Native",
5
5
  "author": "https://getstream.io",
6
6
  "homepage": "https://getstream.io/video/docs/react-native/",
@@ -50,8 +50,8 @@
50
50
  "!**/.*"
51
51
  ],
52
52
  "dependencies": {
53
- "@stream-io/video-client": "1.44.5",
54
- "@stream-io/video-react-bindings": "1.13.14",
53
+ "@stream-io/video-client": "1.44.6-beta.0",
54
+ "@stream-io/video-react-bindings": "1.13.15-beta.0",
55
55
  "intl-pluralrules": "2.0.1",
56
56
  "react-native-url-polyfill": "^3.0.0",
57
57
  "rxjs": "~7.8.2",
@@ -64,18 +64,17 @@
64
64
  "@react-native-firebase/app": ">=17.5.0",
65
65
  "@react-native-firebase/messaging": ">=17.5.0",
66
66
  "@stream-io/noise-cancellation-react-native": ">=0.1.0",
67
- "@stream-io/react-native-webrtc": ">=137.1.0",
67
+ "@stream-io/react-native-callingx": ">=0.1.0",
68
+ "@stream-io/react-native-webrtc": ">=137.1.3",
68
69
  "@stream-io/video-filters-react-native": ">=0.1.0",
69
70
  "expo": ">=47.0.0",
70
71
  "expo-build-properties": "*",
71
72
  "expo-notifications": "*",
72
73
  "react": ">=17.0.0",
73
74
  "react-native": ">=0.73.0",
74
- "react-native-callkeep": ">=4.3.11",
75
75
  "react-native-gesture-handler": ">=2.8.0",
76
76
  "react-native-reanimated": ">=2.7.0",
77
- "react-native-svg": ">=13.6.0",
78
- "react-native-voip-push-notification": ">=3.3.1"
77
+ "react-native-svg": ">=13.6.0"
79
78
  },
80
79
  "peerDependenciesMeta": {
81
80
  "@notifee/react-native": {
@@ -93,6 +92,9 @@
93
92
  "@stream-io/noise-cancellation-react-native": {
94
93
  "optional": true
95
94
  },
95
+ "@stream-io/react-native-callingx": {
96
+ "optional": true
97
+ },
96
98
  "@stream-io/video-filters-react-native": {
97
99
  "optional": true
98
100
  },
@@ -105,17 +107,11 @@
105
107
  "expo-notifications": {
106
108
  "optional": true
107
109
  },
108
- "react-native-callkeep": {
109
- "optional": true
110
- },
111
110
  "react-native-gesture-handler": {
112
111
  "optional": true
113
112
  },
114
113
  "react-native-reanimated": {
115
114
  "optional": true
116
- },
117
- "react-native-voip-push-notification": {
118
- "optional": true
119
115
  }
120
116
  },
121
117
  "devDependencies": {
@@ -129,9 +125,10 @@
129
125
  "@react-native-firebase/app": "^23.4.0",
130
126
  "@react-native-firebase/messaging": "^23.4.0",
131
127
  "@react-native/babel-preset": "^0.81.5",
132
- "@stream-io/noise-cancellation-react-native": "^0.5.1",
133
- "@stream-io/react-native-webrtc": "137.1.0",
134
- "@stream-io/video-filters-react-native": "^0.10.1",
128
+ "@stream-io/noise-cancellation-react-native": "0.6.1-beta.0",
129
+ "@stream-io/react-native-callingx": "0.1.1-beta.1",
130
+ "@stream-io/react-native-webrtc": "137.1.3",
131
+ "@stream-io/video-filters-react-native": "0.11.1-beta.0",
135
132
  "@testing-library/jest-native": "^5.4.3",
136
133
  "@testing-library/react-native": "13.3.3",
137
134
  "@tsconfig/node18": "^18.2.4",
@@ -146,11 +143,9 @@
146
143
  "react": "19.1.0",
147
144
  "react-native": "^0.81.5",
148
145
  "react-native-builder-bob": "~0.23",
149
- "react-native-callkeep": "^4.3.16",
150
146
  "react-native-gesture-handler": "^2.28.0",
151
147
  "react-native-reanimated": "~4.1.2",
152
148
  "react-native-svg": "^15.14.0",
153
- "react-native-voip-push-notification": "3.3.3",
154
149
  "react-native-worklets": "^0.5.0",
155
150
  "react-test-renderer": "19.1.0",
156
151
  "rimraf": "^6.0.1",
@@ -5,7 +5,10 @@ import { ScreenShare } from '../../../icons/ScreenShare';
5
5
  import { StopScreenShare } from '../../../icons/StopScreenShare';
6
6
  import { CallControlsButton } from './CallControlsButton';
7
7
  import { useTheme } from '../../../contexts/ThemeContext';
8
- import { useScreenShareButton } from '../../../hooks/useScreenShareButton';
8
+ import {
9
+ useScreenShareButton,
10
+ type ScreenShareOptions,
11
+ } from '../../../hooks/useScreenShareButton';
9
12
  import { IconWrapper } from '../../../icons';
10
13
 
11
14
  /**
@@ -22,6 +25,10 @@ export type ScreenShareToggleButtonProps = {
22
25
  *
23
26
  */
24
27
  onScreenShareStoppedHandler?: () => void;
28
+ /**
29
+ * Options for screen share behavior (type, includeAudio).
30
+ */
31
+ screenShareOptions?: ScreenShareOptions;
25
32
  };
26
33
 
27
34
  /**
@@ -31,6 +38,7 @@ export type ScreenShareToggleButtonProps = {
31
38
  export const ScreenShareToggleButton = ({
32
39
  onScreenShareStartedHandler,
33
40
  onScreenShareStoppedHandler,
41
+ screenShareOptions,
34
42
  }: ScreenShareToggleButtonProps) => {
35
43
  const {
36
44
  theme: { colors, screenShareToggleButton, variants },
@@ -42,6 +50,8 @@ export const ScreenShareToggleButton = ({
42
50
  screenCapturePickerViewiOSRef,
43
51
  onScreenShareStartedHandler,
44
52
  onScreenShareStoppedHandler,
53
+ undefined,
54
+ screenShareOptions,
45
55
  );
46
56
 
47
57
  if (!onPress) return null;
@@ -6,6 +6,7 @@ export * from './useIsIosScreenshareBroadcastStarted';
6
6
  export * from './useIsInPiPMode';
7
7
  export * from './useAutoEnterPiPEffect';
8
8
  export * from './useScreenShareButton';
9
+ export * from './useScreenShareAudioMixing';
9
10
  export * from './useTrackDimensions';
10
11
  export * from './useScreenshot';
11
12
  export * from './useSpeechDetection';
@@ -1,5 +1,4 @@
1
1
  import { useIosVoipPushEventsSetupEffect } from './useIosVoipPushEventsSetupEffect';
2
- import { useProcessPushCallEffect } from './useProcessPushCallEffect';
3
2
  import { useInitAndroidTokenAndRest } from './useInitAndroidTokenAndRest';
4
3
  import { useIosInitRemoteNotifications } from './useIosInitRemoteNotifications';
5
4
  import { useProcessPushNonRingingCallEffect } from './useProcessPushNonRingingCallEffect';
@@ -12,6 +11,5 @@ export const usePushRegisterEffect = () => {
12
11
  useIosInitRemoteNotifications();
13
12
  useIosVoipPushEventsSetupEffect();
14
13
  useProcessPushNonRingingCallEffect();
15
- useProcessPushCallEffect();
16
14
  useInitAndroidTokenAndRest();
17
15
  };