@stream-io/react-native-callingx 0.1.0-beta.0 → 0.1.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 (147) hide show
  1. package/android/bin/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -1
  2. package/android/bin/src/main/java/io/getstream/rn/callingx/CallService.kt +9 -3
  3. package/android/bin/src/main/java/io/getstream/rn/callingx/CallingxModule.kt +6 -1
  4. package/android/bin/src/main/java/io/getstream/rn/callingx/notifications/CallNotificationManager.kt +42 -12
  5. package/android/bin/src/main/java/io/getstream/rn/callingx/repo/CallRepository.kt +1 -1
  6. package/android/bin/src/main/java/io/getstream/rn/callingx/repo/LegacyCallRepository.kt +7 -2
  7. package/android/bin/src/main/java/io/getstream/rn/callingx/repo/TelecomCallRepository.kt +3 -9
  8. package/android/src/main/java/io/getstream/rn/callingx/CallService.kt +9 -3
  9. package/android/src/main/java/io/getstream/rn/callingx/CallingxModule.kt +6 -1
  10. package/android/src/main/java/io/getstream/rn/callingx/notifications/CallNotificationManager.kt +42 -12
  11. package/android/src/main/java/io/getstream/rn/callingx/repo/CallRepository.kt +1 -1
  12. package/android/src/main/java/io/getstream/rn/callingx/repo/LegacyCallRepository.kt +8 -2
  13. package/android/src/main/java/io/getstream/rn/callingx/repo/TelecomCallRepository.kt +3 -9
  14. package/ios/CallingxImpl.swift +8 -0
  15. package/package.json +1 -1
  16. package/android/bin/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
  17. package/android/bin/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  18. package/android/bin/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  19. package/android/bin/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -3
  20. package/android/bin/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/drawable_ic_phone_paused_24.xml.flat +0 -0
  21. package/android/bin/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/drawable_ic_round_call_24.xml.flat +0 -0
  22. package/android/bin/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/drawable_ic_user.xml.flat +0 -0
  23. package/android/bin/build/intermediates/incremental/mergeDebugAssets/merger.xml +0 -2
  24. package/android/bin/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  25. package/android/bin/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  26. package/android/bin/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/stream-io_react-native-callingx_debug.kotlin_module +0 -0
  27. package/android/bin/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -5
  28. package/android/bin/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/stream-io_react-native-callingx_debug.kotlin_module +0 -0
  29. package/android/bin/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  30. package/android/bin/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -4
  31. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  32. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  33. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  34. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  35. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  36. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  37. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  38. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  39. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  40. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  41. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  42. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  43. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  44. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  45. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  46. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  47. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  48. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  49. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  50. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  51. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  52. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  53. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  54. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  55. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  56. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  57. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  58. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  59. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  60. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  61. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  62. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  63. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  64. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  65. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  66. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
  67. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
  68. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
  69. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
  70. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
  71. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
  72. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len +0 -0
  73. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  74. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  75. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  76. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  77. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values +0 -0
  78. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  79. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.s +0 -1
  80. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  81. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  82. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  83. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  84. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  85. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  86. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  87. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  88. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  89. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  90. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  91. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  92. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  93. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  94. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  95. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  96. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  97. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  98. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  99. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  100. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  101. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  102. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  103. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
  104. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  105. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  106. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  107. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  108. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  109. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  110. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  111. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  112. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  113. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  114. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  115. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  116. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  117. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  118. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  119. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  120. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  121. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  122. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  123. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  124. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  125. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  126. package/android/bin/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  127. package/android/bin/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  128. package/android/bin/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  129. package/android/bin/build/tmp/kotlin-classes/debug/META-INF/stream-io_react-native-callingx_debug.kotlin_module +0 -0
  130. package/android/bin/build.gradle +0 -81
  131. package/android/bin/gradle.properties +0 -5
  132. package/android/bin/local.properties +0 -8
  133. package/android/bin/src/main/AndroidManifest.xml +0 -30
  134. package/android/bin/src/main/java/io/getstream/rn/callingx/CallingxPackage.kt +0 -16
  135. package/android/bin/src/main/java/io/getstream/rn/callingx/HeadlessTaskManager.kt +0 -164
  136. package/android/bin/src/main/java/io/getstream/rn/callingx/ResourceUtils.kt +0 -60
  137. package/android/bin/src/main/java/io/getstream/rn/callingx/Utils.kt +0 -23
  138. package/android/bin/src/main/java/io/getstream/rn/callingx/model/Call.kt +0 -57
  139. package/android/bin/src/main/java/io/getstream/rn/callingx/model/CallAction.kt +0 -36
  140. package/android/bin/src/main/java/io/getstream/rn/callingx/notifications/NotificationChannelsManager.kt +0 -113
  141. package/android/bin/src/main/java/io/getstream/rn/callingx/notifications/NotificationIntentFactory.kt +0 -105
  142. package/android/bin/src/main/java/io/getstream/rn/callingx/notifications/NotificationReceiverActivity.kt +0 -42
  143. package/android/bin/src/main/java/io/getstream/rn/callingx/notifications/NotificationReceiverService.kt +0 -56
  144. package/android/bin/src/main/java/io/getstream/rn/callingx/notifications/NotificationsConfig.kt +0 -116
  145. package/android/bin/src/main/res/drawable/ic_phone_paused_24.xml +0 -11
  146. package/android/bin/src/main/res/drawable/ic_round_call_24.xml +0 -11
  147. package/android/bin/src/main/res/drawable/ic_user.xml +0 -27
@@ -1,4 +1,4 @@
1
- #Wed Jan 28 15:04:08 CET 2026
1
+ #Wed Feb 04 17:19:56 CET 2026
2
2
  io.getstream.rn.callingx.stream-io_react-native-callingx-main-6\:/drawable/ic_phone_paused_24.xml=/Users/greenfrvr/dev/stream/stream-video-js/sample-apps/react-native/dogfood/node_modules/@stream-io/react-native-callingx/android/build/intermediates/packaged_res/debug/packageDebugResources/drawable/ic_phone_paused_24.xml
3
3
  io.getstream.rn.callingx.stream-io_react-native-callingx-main-6\:/drawable/ic_round_call_24.xml=/Users/greenfrvr/dev/stream/stream-video-js/sample-apps/react-native/dogfood/node_modules/@stream-io/react-native-callingx/android/build/intermediates/packaged_res/debug/packageDebugResources/drawable/ic_round_call_24.xml
4
4
  io.getstream.rn.callingx.stream-io_react-native-callingx-main-6\:/drawable/ic_user.xml=/Users/greenfrvr/dev/stream/stream-video-js/sample-apps/react-native/dogfood/node_modules/@stream-io/react-native-callingx/android/build/intermediates/packaged_res/debug/packageDebugResources/drawable/ic_user.xml
@@ -241,9 +241,15 @@ class CallService : Service(), CallRepository.Listener {
241
241
  }
242
242
  }
243
243
 
244
- override fun onCallRegistered(callId: String) {
245
- sendBroadcastEvent(CallingxModule.CALL_REGISTERED_ACTION) {
246
- putExtra(CallingxModule.EXTRA_CALL_ID, callId)
244
+ override fun onCallRegistered(callId: String, incoming: Boolean) {
245
+ if (incoming) {
246
+ sendBroadcastEvent(CallingxModule.CALL_REGISTERED_INCOMING_ACTION) {
247
+ putExtra(CallingxModule.EXTRA_CALL_ID, callId)
248
+ }
249
+ } else {
250
+ sendBroadcastEvent(CallingxModule.CALL_REGISTERED_ACTION) {
251
+ putExtra(CallingxModule.EXTRA_CALL_ID, callId)
252
+ }
247
253
  }
248
254
  }
249
255
 
@@ -42,6 +42,7 @@ class CallingxModule(reactContext: ReactApplicationContext) : NativeCallingxSpec
42
42
  const val EXTRA_SOURCE = "source"
43
43
 
44
44
  const val CALL_REGISTERED_ACTION = "call_registered"
45
+ const val CALL_REGISTERED_INCOMING_ACTION = "call_registered_incoming"
45
46
  const val CALL_ANSWERED_ACTION = "call_answered"
46
47
  // const val CALL_DISCONNECTED_ACTION = "call_disconnected"
47
48
  const val CALL_INACTIVE_ACTION = "call_inactive"
@@ -365,7 +366,7 @@ class CallingxModule(reactContext: ReactApplicationContext) : NativeCallingxSpec
365
366
  if (!isHeadlessTaskRegistered) {
366
367
  debugLog(
367
368
  TAG,
368
- "[module] startBackgroundTaskAutomatically: Headless task registered, starting automatically"
369
+ "[module] startBackgroundTaskAutomatically: Headless task is not registered"
369
370
  )
370
371
  return
371
372
  }
@@ -446,6 +447,7 @@ class CallingxModule(reactContext: ReactApplicationContext) : NativeCallingxSpec
446
447
  private fun getReceiverFilter(): IntentFilter =
447
448
  IntentFilter().apply {
448
449
  addAction(CALL_REGISTERED_ACTION)
450
+ addAction(CALL_REGISTERED_INCOMING_ACTION)
449
451
  addAction(CALL_ANSWERED_ACTION)
450
452
  addAction(CALL_ACTIVE_ACTION)
451
453
  addAction(CALL_INACTIVE_ACTION)
@@ -560,6 +562,9 @@ class CallingxModule(reactContext: ReactApplicationContext) : NativeCallingxSpec
560
562
  CALL_REGISTERED_ACTION -> {
561
563
  sendJSEvent("didReceiveStartCallAction", params)
562
564
  }
565
+ CALL_REGISTERED_INCOMING_ACTION -> {
566
+ sendJSEvent("didDisplayIncomingCall", params)
567
+ }
563
568
  CALL_ANSWERED_ACTION -> {
564
569
  if (intent.hasExtra(EXTRA_SOURCE)) {
565
570
  params.putString("source", intent.getStringExtra(EXTRA_SOURCE))
@@ -4,6 +4,7 @@ import android.app.Notification
4
4
  import android.content.Context
5
5
  import android.media.Ringtone
6
6
  import android.media.RingtoneManager
7
+ import android.net.Uri
7
8
  import android.os.Build
8
9
  import android.telecom.DisconnectCause
9
10
  import android.util.Log
@@ -44,11 +45,35 @@ class CallNotificationManager(
44
45
 
45
46
  private var hasBecameActive = false
46
47
 
48
+ private var lastPostedSnapshot: NotificationSnapshot? = null
49
+
50
+ /**
51
+ * Snapshot of call state used to detect notification changes.
52
+ * Using a data class ensures immutable comparison and avoids issues
53
+ * with mutable Call.Registered objects.
54
+ */
55
+ private data class NotificationSnapshot(
56
+ val id: String,
57
+ val isActive: Boolean,
58
+ val isIncoming: Boolean,
59
+ val displayTitle: String?,
60
+ val displaySubtitle: String?,
61
+ val displayName: CharSequence,
62
+ val address: Uri
63
+ )
64
+
65
+ private fun Call.Registered.toSnapshot() = NotificationSnapshot(
66
+ id = id,
67
+ isActive = isActive,
68
+ isIncoming = isIncoming(),
69
+ displayTitle = displayOptions?.getString(CallService.EXTRA_DISPLAY_TITLE),
70
+ displaySubtitle = displayOptions?.getString(CallService.EXTRA_DISPLAY_SUBTITLE),
71
+ displayName = callAttributes.displayName,
72
+ address = callAttributes.address
73
+ )
74
+
47
75
  fun createNotification(call: Call.Registered): Notification {
48
- debugLog(
49
- TAG,
50
- "[notifications] createNotification: Creating notification for call ID: ${call.id}"
51
- )
76
+ debugLog(TAG,"[notifications] createNotification: Creating notification for call ID: ${call.id}")
52
77
 
53
78
  val contentIntent =
54
79
  NotificationIntentFactory.getLaunchActivityIntent(
@@ -90,19 +115,22 @@ class CallNotificationManager(
90
115
  fun updateCallNotification(call: Call) {
91
116
  when (call) {
92
117
  Call.None, is Call.Unregistered -> {
93
- debugLog(
94
- TAG,
95
- "[notifications] updateCallNotification: Dismissing notification (call is None or Unregistered)"
96
- )
118
+ debugLog(TAG, "[notifications] updateCallNotification: Dismissing notification (call is None or Unregistered)")
97
119
  notificationManager.cancel(NOTIFICATION_ID)
120
+ lastPostedSnapshot = null
121
+ hasBecameActive = false
98
122
  }
99
123
  is Call.Registered -> {
124
+ val newSnapshot = call.toSnapshot()
125
+ if (newSnapshot == lastPostedSnapshot) {
126
+ debugLog(TAG, "[notifications] updateCallNotification: Skipping - no state change")
127
+ return
128
+ }
129
+
130
+ lastPostedSnapshot = newSnapshot
100
131
  val notification = createNotification(call)
101
132
  notificationManager.notify(NOTIFICATION_ID, notification)
102
- debugLog(
103
- TAG,
104
- "[notifications] updateCallNotification: Notification posted successfully"
105
- )
133
+ debugLog(TAG, "[notifications] updateCallNotification: Notification posted successfully")
106
134
  }
107
135
  }
108
136
  }
@@ -110,6 +138,7 @@ class CallNotificationManager(
110
138
  fun cancelNotifications() {
111
139
  notificationManager.cancel(NOTIFICATION_ID)
112
140
  hasBecameActive = false
141
+ lastPostedSnapshot = null
113
142
  }
114
143
 
115
144
  fun startRingtone() {
@@ -212,4 +241,5 @@ class CallNotificationManager(
212
241
  .setImportant(true)
213
242
  .build()
214
243
  }
244
+
215
245
  }
@@ -34,7 +34,7 @@ abstract class CallRepository(protected val context: Context) {
34
34
  fun onIsCallDisconnected(callId: String?, cause: DisconnectCause, source: EventSource)
35
35
  fun onIsCallInactive(callId: String)
36
36
  fun onIsCallActive(callId: String)
37
- fun onCallRegistered(callId: String)
37
+ fun onCallRegistered(callId: String, incoming: Boolean)
38
38
  fun onMuteCallChanged(callId: String, isMuted: Boolean)
39
39
  fun onCallEndpointChanged(callId: String, endpoint: String)
40
40
  }
@@ -20,12 +20,15 @@ class LegacyCallRepository(context: Context) : CallRepository(context) {
20
20
  private const val TAG = "[Callingx] LegacyCallRepository"
21
21
  }
22
22
 
23
+ private var observeCallStateJob: Job? = null
24
+
23
25
  override fun getTag(): String = TAG
24
26
 
25
27
  override fun setListener(listener: Listener?) {
26
28
  this._listener = listener
27
29
  // Observe call state changes
28
- scope.launch {
30
+ observeCallStateJob?.cancel()
31
+ observeCallStateJob = scope.launch {
29
32
  try {
30
33
  currentCall.collect { _listener?.onCallStateChanged(it) }
31
34
  } catch (e: Exception) {
@@ -37,6 +40,8 @@ class LegacyCallRepository(context: Context) : CallRepository(context) {
37
40
  override fun release() {
38
41
  _currentCall.value = Call.None
39
42
 
43
+ observeCallStateJob?.cancel()
44
+ observeCallStateJob = null
40
45
  _listener = null
41
46
 
42
47
  scope.cancel()
@@ -76,7 +81,7 @@ class LegacyCallRepository(context: Context) : CallRepository(context) {
76
81
  actionSource = actionSource,
77
82
  )
78
83
 
79
- _listener?.onCallRegistered(callId)
84
+ _listener?.onCallRegistered(callId, isIncoming)
80
85
 
81
86
  // Process actions without telecom SDK
82
87
  scope.launch {
@@ -199,9 +199,7 @@ class TelecomCallRepository(context: Context) : CallRepository(context) {
199
199
  .onEach { (previous, current) ->
200
200
  when {
201
201
  previous is Call.None && current is Call.Registered -> {
202
- if (!current.isIncoming()) {
203
- _listener?.onCallRegistered(current.id)
204
- }
202
+ _listener?.onCallRegistered(current.id, current.isIncoming())
205
203
  }
206
204
  previous is Call.Registered && current is Call.Registered -> {
207
205
  if (previous.isMuted != current.isMuted) {
@@ -372,9 +370,7 @@ class TelecomCallRepository(context: Context) : CallRepository(context) {
372
370
  updateCurrentCall { copy(isActive = true, isOnHold = false) }
373
371
 
374
372
  val call = _currentCall.value
375
- val source =
376
- if (isSelfAnswered) EventSource.APP
377
- else EventSource.SYS
373
+ val source = if (isSelfAnswered) EventSource.APP else EventSource.SYS
378
374
  if (call is Call.Registered) {
379
375
  _listener?.onIsCallAnswered(call.id, source)
380
376
  }
@@ -388,9 +384,7 @@ class TelecomCallRepository(context: Context) : CallRepository(context) {
388
384
  TAG,
389
385
  "[repository] onIsCallDisconnected: Call disconnected, cause: ${it.reason}, description: ${it.description}"
390
386
  )
391
- val source =
392
- if (isSelfDisconnected) EventSource.APP
393
- else EventSource.SYS
387
+ val source = if (isSelfDisconnected) EventSource.APP else EventSource.SYS
394
388
  var callId: String? = null
395
389
  if (_currentCall.value is Call.Registered) {
396
390
  callId = (_currentCall.value as Call.Registered).id
@@ -241,9 +241,15 @@ class CallService : Service(), CallRepository.Listener {
241
241
  }
242
242
  }
243
243
 
244
- override fun onCallRegistered(callId: String) {
245
- sendBroadcastEvent(CallingxModule.CALL_REGISTERED_ACTION) {
246
- putExtra(CallingxModule.EXTRA_CALL_ID, callId)
244
+ override fun onCallRegistered(callId: String, incoming: Boolean) {
245
+ if (incoming) {
246
+ sendBroadcastEvent(CallingxModule.CALL_REGISTERED_INCOMING_ACTION) {
247
+ putExtra(CallingxModule.EXTRA_CALL_ID, callId)
248
+ }
249
+ } else {
250
+ sendBroadcastEvent(CallingxModule.CALL_REGISTERED_ACTION) {
251
+ putExtra(CallingxModule.EXTRA_CALL_ID, callId)
252
+ }
247
253
  }
248
254
  }
249
255
 
@@ -42,6 +42,7 @@ class CallingxModule(reactContext: ReactApplicationContext) : NativeCallingxSpec
42
42
  const val EXTRA_SOURCE = "source"
43
43
 
44
44
  const val CALL_REGISTERED_ACTION = "call_registered"
45
+ const val CALL_REGISTERED_INCOMING_ACTION = "call_registered_incoming"
45
46
  const val CALL_ANSWERED_ACTION = "call_answered"
46
47
  // const val CALL_DISCONNECTED_ACTION = "call_disconnected"
47
48
  const val CALL_INACTIVE_ACTION = "call_inactive"
@@ -365,7 +366,7 @@ class CallingxModule(reactContext: ReactApplicationContext) : NativeCallingxSpec
365
366
  if (!isHeadlessTaskRegistered) {
366
367
  debugLog(
367
368
  TAG,
368
- "[module] startBackgroundTaskAutomatically: Headless task registered, starting automatically"
369
+ "[module] startBackgroundTaskAutomatically: Headless task is not registered"
369
370
  )
370
371
  return
371
372
  }
@@ -446,6 +447,7 @@ class CallingxModule(reactContext: ReactApplicationContext) : NativeCallingxSpec
446
447
  private fun getReceiverFilter(): IntentFilter =
447
448
  IntentFilter().apply {
448
449
  addAction(CALL_REGISTERED_ACTION)
450
+ addAction(CALL_REGISTERED_INCOMING_ACTION)
449
451
  addAction(CALL_ANSWERED_ACTION)
450
452
  addAction(CALL_ACTIVE_ACTION)
451
453
  addAction(CALL_INACTIVE_ACTION)
@@ -560,6 +562,9 @@ class CallingxModule(reactContext: ReactApplicationContext) : NativeCallingxSpec
560
562
  CALL_REGISTERED_ACTION -> {
561
563
  sendJSEvent("didReceiveStartCallAction", params)
562
564
  }
565
+ CALL_REGISTERED_INCOMING_ACTION -> {
566
+ sendJSEvent("didDisplayIncomingCall", params)
567
+ }
563
568
  CALL_ANSWERED_ACTION -> {
564
569
  if (intent.hasExtra(EXTRA_SOURCE)) {
565
570
  params.putString("source", intent.getStringExtra(EXTRA_SOURCE))
@@ -4,6 +4,7 @@ import android.app.Notification
4
4
  import android.content.Context
5
5
  import android.media.Ringtone
6
6
  import android.media.RingtoneManager
7
+ import android.net.Uri
7
8
  import android.os.Build
8
9
  import android.telecom.DisconnectCause
9
10
  import android.util.Log
@@ -44,11 +45,35 @@ class CallNotificationManager(
44
45
 
45
46
  private var hasBecameActive = false
46
47
 
48
+ private var lastPostedSnapshot: NotificationSnapshot? = null
49
+
50
+ /**
51
+ * Snapshot of call state used to detect notification changes.
52
+ * Using a data class ensures immutable comparison and avoids issues
53
+ * with mutable Call.Registered objects.
54
+ */
55
+ private data class NotificationSnapshot(
56
+ val id: String,
57
+ val isActive: Boolean,
58
+ val isIncoming: Boolean,
59
+ val displayTitle: String?,
60
+ val displaySubtitle: String?,
61
+ val displayName: CharSequence,
62
+ val address: Uri
63
+ )
64
+
65
+ private fun Call.Registered.toSnapshot() = NotificationSnapshot(
66
+ id = id,
67
+ isActive = isActive,
68
+ isIncoming = isIncoming(),
69
+ displayTitle = displayOptions?.getString(CallService.EXTRA_DISPLAY_TITLE),
70
+ displaySubtitle = displayOptions?.getString(CallService.EXTRA_DISPLAY_SUBTITLE),
71
+ displayName = callAttributes.displayName,
72
+ address = callAttributes.address
73
+ )
74
+
47
75
  fun createNotification(call: Call.Registered): Notification {
48
- debugLog(
49
- TAG,
50
- "[notifications] createNotification: Creating notification for call ID: ${call.id}"
51
- )
76
+ debugLog(TAG,"[notifications] createNotification: Creating notification for call ID: ${call.id}")
52
77
 
53
78
  val contentIntent =
54
79
  NotificationIntentFactory.getLaunchActivityIntent(
@@ -90,19 +115,22 @@ class CallNotificationManager(
90
115
  fun updateCallNotification(call: Call) {
91
116
  when (call) {
92
117
  Call.None, is Call.Unregistered -> {
93
- debugLog(
94
- TAG,
95
- "[notifications] updateCallNotification: Dismissing notification (call is None or Unregistered)"
96
- )
118
+ debugLog(TAG, "[notifications] updateCallNotification: Dismissing notification (call is None or Unregistered)")
97
119
  notificationManager.cancel(NOTIFICATION_ID)
120
+ lastPostedSnapshot = null
121
+ hasBecameActive = false
98
122
  }
99
123
  is Call.Registered -> {
124
+ val newSnapshot = call.toSnapshot()
125
+ if (newSnapshot == lastPostedSnapshot) {
126
+ debugLog(TAG, "[notifications] updateCallNotification: Skipping - no state change")
127
+ return
128
+ }
129
+
130
+ lastPostedSnapshot = newSnapshot
100
131
  val notification = createNotification(call)
101
132
  notificationManager.notify(NOTIFICATION_ID, notification)
102
- debugLog(
103
- TAG,
104
- "[notifications] updateCallNotification: Notification posted successfully"
105
- )
133
+ debugLog(TAG, "[notifications] updateCallNotification: Notification posted successfully")
106
134
  }
107
135
  }
108
136
  }
@@ -110,6 +138,7 @@ class CallNotificationManager(
110
138
  fun cancelNotifications() {
111
139
  notificationManager.cancel(NOTIFICATION_ID)
112
140
  hasBecameActive = false
141
+ lastPostedSnapshot = null
113
142
  }
114
143
 
115
144
  fun startRingtone() {
@@ -212,4 +241,5 @@ class CallNotificationManager(
212
241
  .setImportant(true)
213
242
  .build()
214
243
  }
244
+
215
245
  }
@@ -34,7 +34,7 @@ abstract class CallRepository(protected val context: Context) {
34
34
  fun onIsCallDisconnected(callId: String?, cause: DisconnectCause, source: EventSource)
35
35
  fun onIsCallInactive(callId: String)
36
36
  fun onIsCallActive(callId: String)
37
- fun onCallRegistered(callId: String)
37
+ fun onCallRegistered(callId: String, incoming: Boolean)
38
38
  fun onMuteCallChanged(callId: String, isMuted: Boolean)
39
39
  fun onCallEndpointChanged(callId: String, endpoint: String)
40
40
  }
@@ -7,6 +7,7 @@ import android.util.Log
7
7
  import androidx.core.telecom.CallAttributesCompat
8
8
  import io.getstream.rn.callingx.model.Call
9
9
  import io.getstream.rn.callingx.model.CallAction
10
+ import kotlinx.coroutines.Job
10
11
  import kotlinx.coroutines.cancel
11
12
  import kotlinx.coroutines.channels.Channel
12
13
  import kotlinx.coroutines.flow.consumeAsFlow
@@ -20,12 +21,15 @@ class LegacyCallRepository(context: Context) : CallRepository(context) {
20
21
  private const val TAG = "[Callingx] LegacyCallRepository"
21
22
  }
22
23
 
24
+ private var observeCallStateJob: Job? = null
25
+
23
26
  override fun getTag(): String = TAG
24
27
 
25
28
  override fun setListener(listener: Listener?) {
26
29
  this._listener = listener
27
30
  // Observe call state changes
28
- scope.launch {
31
+ observeCallStateJob?.cancel()
32
+ observeCallStateJob = scope.launch {
29
33
  try {
30
34
  currentCall.collect { _listener?.onCallStateChanged(it) }
31
35
  } catch (e: Exception) {
@@ -37,6 +41,8 @@ class LegacyCallRepository(context: Context) : CallRepository(context) {
37
41
  override fun release() {
38
42
  _currentCall.value = Call.None
39
43
 
44
+ observeCallStateJob?.cancel()
45
+ observeCallStateJob = null
40
46
  _listener = null
41
47
 
42
48
  scope.cancel()
@@ -76,7 +82,7 @@ class LegacyCallRepository(context: Context) : CallRepository(context) {
76
82
  actionSource = actionSource,
77
83
  )
78
84
 
79
- _listener?.onCallRegistered(callId)
85
+ _listener?.onCallRegistered(callId, isIncoming)
80
86
 
81
87
  // Process actions without telecom SDK
82
88
  scope.launch {
@@ -199,9 +199,7 @@ class TelecomCallRepository(context: Context) : CallRepository(context) {
199
199
  .onEach { (previous, current) ->
200
200
  when {
201
201
  previous is Call.None && current is Call.Registered -> {
202
- if (!current.isIncoming()) {
203
- _listener?.onCallRegistered(current.id)
204
- }
202
+ _listener?.onCallRegistered(current.id, current.isIncoming())
205
203
  }
206
204
  previous is Call.Registered && current is Call.Registered -> {
207
205
  if (previous.isMuted != current.isMuted) {
@@ -372,9 +370,7 @@ class TelecomCallRepository(context: Context) : CallRepository(context) {
372
370
  updateCurrentCall { copy(isActive = true, isOnHold = false) }
373
371
 
374
372
  val call = _currentCall.value
375
- val source =
376
- if (isSelfAnswered) EventSource.APP
377
- else EventSource.SYS
373
+ val source = if (isSelfAnswered) EventSource.APP else EventSource.SYS
378
374
  if (call is Call.Registered) {
379
375
  _listener?.onIsCallAnswered(call.id, source)
380
376
  }
@@ -388,9 +384,7 @@ class TelecomCallRepository(context: Context) : CallRepository(context) {
388
384
  TAG,
389
385
  "[repository] onIsCallDisconnected: Call disconnected, cause: ${it.reason}, description: ${it.description}"
390
386
  )
391
- val source =
392
- if (isSelfDisconnected) EventSource.APP
393
- else EventSource.SYS
387
+ val source = if (isSelfDisconnected) EventSource.APP else EventSource.SYS
394
388
  var callId: String? = null
395
389
  if (_currentCall.value is Call.Registered) {
396
390
  callId = (_currentCall.value as Call.Registered).id
@@ -110,6 +110,7 @@ import stream_react_native_webrtc
110
110
  #if DEBUG
111
111
  print("[Callingx][reportNewIncomingCall] callId already exists")
112
112
  #endif
113
+ completion?()
113
114
  return
114
115
  }
115
116
 
@@ -519,6 +520,13 @@ import stream_react_native_webrtc
519
520
  #endif
520
521
 
521
522
  guard let storage = CallingxImpl.uuidStorage else { return }
523
+
524
+ if (storage.containsCid(callId)) {
525
+ #if DEBUG
526
+ print("[Callingx][startCall] Call \(callId) is already registered")
527
+ #endif
528
+ return
529
+ }
522
530
 
523
531
  let handleType = Settings.getHandleType("generic")
524
532
  let uuid = storage.getOrCreateUUID(forCid: callId)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/react-native-callingx",
3
- "version": "0.1.0-beta.0",
3
+ "version": "0.1.0-beta.1",
4
4
  "description": "CallKit and Telecom API capabilities for React Native",
5
5
  "main": "./dist/module/index.js",
6
6
  "module": "./dist/module/index.js",
@@ -1,3 +0,0 @@
1
- int drawable ic_phone_paused_24 0x0
2
- int drawable ic_round_call_24 0x0
3
- int drawable ic_user 0x0
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/greenfrvr/dev/stream/stream-video-js/sample-apps/react-native/dogfood/node_modules/@stream-io/react-native-callingx/android/src/main/assets"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/greenfrvr/dev/stream/stream-video-js/sample-apps/react-native/dogfood/node_modules/@stream-io/react-native-callingx/android/src/debug/assets"/></dataSet><dataSet config="generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/greenfrvr/dev/stream/stream-video-js/sample-apps/react-native/dogfood/node_modules/@stream-io/react-native-callingx/android/build/intermediates/shader_assets/debug/compileDebugShaders/out"/></dataSet></merger>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/greenfrvr/dev/stream/stream-video-js/sample-apps/react-native/dogfood/node_modules/@stream-io/react-native-callingx/android/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/greenfrvr/dev/stream/stream-video-js/sample-apps/react-native/dogfood/node_modules/@stream-io/react-native-callingx/android/src/debug/jniLibs"/></dataSet></merger>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/greenfrvr/dev/stream/stream-video-js/sample-apps/react-native/dogfood/node_modules/@stream-io/react-native-callingx/android/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/greenfrvr/dev/stream/stream-video-js/sample-apps/react-native/dogfood/node_modules/@stream-io/react-native-callingx/android/src/debug/shaders"/></dataSet></merger>
@@ -1,5 +0,0 @@
1
- R_DEF: Internal format may change without notice
2
- local
3
- drawable ic_phone_paused_24
4
- drawable ic_round_call_24
5
- drawable ic_user
@@ -1,4 +0,0 @@
1
- io.getstream.rn.callingx
2
- drawable ic_phone_paused_24
3
- drawable ic_round_call_24
4
- drawable ic_user