@stream-io/react-native-callingx 0.1.0-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 (256) hide show
  1. package/Callingx.podspec +23 -0
  2. package/LICENSE +219 -0
  3. package/README.md +392 -0
  4. package/android/bin/build/generated/source/buildConfig/debug/io/getstream/rn/callingx/BuildConfig.class +0 -0
  5. package/android/bin/build/generated/source/codegen/java/io/getstream/rn/callingx/NativeCallingxSpec.class +0 -0
  6. package/android/bin/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
  7. package/android/bin/build/generated/source/codegen/jni/CallingxSpec-generated.cpp +167 -0
  8. package/android/bin/build/generated/source/codegen/jni/CallingxSpec.h +31 -0
  9. package/android/bin/build/generated/source/codegen/jni/react/renderer/components/CallingxSpec/CallingxSpecJSI-generated.cpp +196 -0
  10. package/android/bin/build/generated/source/codegen/jni/react/renderer/components/CallingxSpec/CallingxSpecJSI.h +283 -0
  11. package/android/bin/build/generated/source/codegen/jni/react/renderer/components/CallingxSpec/ComponentDescriptors.cpp +22 -0
  12. package/android/bin/build/generated/source/codegen/jni/react/renderer/components/CallingxSpec/ComponentDescriptors.h +24 -0
  13. package/android/bin/build/generated/source/codegen/jni/react/renderer/components/CallingxSpec/EventEmitters.cpp +16 -0
  14. package/android/bin/build/generated/source/codegen/jni/react/renderer/components/CallingxSpec/EventEmitters.h +17 -0
  15. package/android/bin/build/generated/source/codegen/jni/react/renderer/components/CallingxSpec/Props.cpp +19 -0
  16. package/android/bin/build/generated/source/codegen/jni/react/renderer/components/CallingxSpec/Props.h +18 -0
  17. package/android/bin/build/generated/source/codegen/jni/react/renderer/components/CallingxSpec/ShadowNodes.cpp +17 -0
  18. package/android/bin/build/generated/source/codegen/jni/react/renderer/components/CallingxSpec/ShadowNodes.h +23 -0
  19. package/android/bin/build/generated/source/codegen/jni/react/renderer/components/CallingxSpec/States.cpp +16 -0
  20. package/android/bin/build/generated/source/codegen/jni/react/renderer/components/CallingxSpec/States.h +20 -0
  21. package/android/bin/build/generated/source/codegen/schema.json +1 -0
  22. package/android/bin/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +33 -0
  23. package/android/bin/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  24. package/android/bin/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  25. package/android/bin/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  26. package/android/bin/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  27. package/android/bin/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  28. package/android/bin/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +3 -0
  29. package/android/bin/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/drawable_ic_phone_paused_24.xml.flat +0 -0
  30. package/android/bin/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/drawable_ic_round_call_24.xml.flat +0 -0
  31. package/android/bin/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/drawable_ic_user.xml.flat +0 -0
  32. package/android/bin/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +4 -0
  33. package/android/bin/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  34. package/android/bin/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
  35. package/android/bin/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  36. package/android/bin/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  37. package/android/bin/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/stream-io_react-native-callingx_debug.kotlin_module +0 -0
  38. package/android/bin/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +5 -0
  39. package/android/bin/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +60 -0
  40. package/android/bin/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +33 -0
  41. package/android/bin/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  42. package/android/bin/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  43. package/android/bin/build/intermediates/packaged_res/debug/packageDebugResources/drawable/ic_phone_paused_24.xml +11 -0
  44. package/android/bin/build/intermediates/packaged_res/debug/packageDebugResources/drawable/ic_round_call_24.xml +11 -0
  45. package/android/bin/build/intermediates/packaged_res/debug/packageDebugResources/drawable/ic_user.xml +27 -0
  46. package/android/bin/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/stream-io_react-native-callingx_debug.kotlin_module +0 -0
  47. package/android/bin/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  48. package/android/bin/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +4 -0
  49. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  50. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  51. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  52. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  53. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  54. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  55. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  56. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  57. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  58. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  59. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  60. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  61. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  62. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  63. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  64. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  65. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  66. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  67. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  68. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  69. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  70. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  71. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  72. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  73. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  74. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  75. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  76. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  77. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  78. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  79. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  80. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  81. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  82. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  83. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  84. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
  85. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
  86. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
  87. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
  88. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
  89. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
  90. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len +0 -0
  91. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  92. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  93. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  94. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  95. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values +0 -0
  96. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  97. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.s +1 -0
  98. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  99. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  100. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  101. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  102. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  103. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  104. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  105. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  106. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  107. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  108. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  109. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  110. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  111. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  112. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  113. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  114. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  115. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  116. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  117. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  118. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  119. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  120. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  121. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  122. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  123. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  124. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  125. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  126. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  127. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  128. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  129. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  130. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  131. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  132. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  133. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  134. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  135. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  136. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  137. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  138. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  139. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  140. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  141. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  142. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  143. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  144. package/android/bin/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  145. package/android/bin/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  146. package/android/bin/build/outputs/logs/manifest-merger-debug-report.txt +70 -0
  147. package/android/bin/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  148. package/android/bin/build/tmp/kotlin-classes/debug/META-INF/stream-io_react-native-callingx_debug.kotlin_module +0 -0
  149. package/android/bin/build.gradle +81 -0
  150. package/android/bin/gradle.properties +5 -0
  151. package/android/bin/local.properties +8 -0
  152. package/android/bin/src/main/AndroidManifest.xml +30 -0
  153. package/android/bin/src/main/java/io/getstream/rn/callingx/CallService.kt +396 -0
  154. package/android/bin/src/main/java/io/getstream/rn/callingx/CallingxModule.kt +639 -0
  155. package/android/bin/src/main/java/io/getstream/rn/callingx/CallingxPackage.kt +16 -0
  156. package/android/bin/src/main/java/io/getstream/rn/callingx/HeadlessTaskManager.kt +164 -0
  157. package/android/bin/src/main/java/io/getstream/rn/callingx/ResourceUtils.kt +60 -0
  158. package/android/bin/src/main/java/io/getstream/rn/callingx/Utils.kt +23 -0
  159. package/android/bin/src/main/java/io/getstream/rn/callingx/model/Call.kt +57 -0
  160. package/android/bin/src/main/java/io/getstream/rn/callingx/model/CallAction.kt +36 -0
  161. package/android/bin/src/main/java/io/getstream/rn/callingx/notifications/CallNotificationManager.kt +215 -0
  162. package/android/bin/src/main/java/io/getstream/rn/callingx/notifications/NotificationChannelsManager.kt +113 -0
  163. package/android/bin/src/main/java/io/getstream/rn/callingx/notifications/NotificationIntentFactory.kt +105 -0
  164. package/android/bin/src/main/java/io/getstream/rn/callingx/notifications/NotificationReceiverActivity.kt +42 -0
  165. package/android/bin/src/main/java/io/getstream/rn/callingx/notifications/NotificationReceiverService.kt +56 -0
  166. package/android/bin/src/main/java/io/getstream/rn/callingx/notifications/NotificationsConfig.kt +116 -0
  167. package/android/bin/src/main/java/io/getstream/rn/callingx/repo/CallRepository.kt +163 -0
  168. package/android/bin/src/main/java/io/getstream/rn/callingx/repo/LegacyCallRepository.kt +134 -0
  169. package/android/bin/src/main/java/io/getstream/rn/callingx/repo/TelecomCallRepository.kt +438 -0
  170. package/android/bin/src/main/res/drawable/ic_phone_paused_24.xml +11 -0
  171. package/android/bin/src/main/res/drawable/ic_round_call_24.xml +11 -0
  172. package/android/bin/src/main/res/drawable/ic_user.xml +27 -0
  173. package/android/build.gradle +81 -0
  174. package/android/gradle.properties +5 -0
  175. package/android/src/main/AndroidManifest.xml +30 -0
  176. package/android/src/main/java/io/getstream/rn/callingx/CallService.kt +396 -0
  177. package/android/src/main/java/io/getstream/rn/callingx/CallingxModule.kt +639 -0
  178. package/android/src/main/java/io/getstream/rn/callingx/CallingxPackage.kt +16 -0
  179. package/android/src/main/java/io/getstream/rn/callingx/HeadlessTaskManager.kt +164 -0
  180. package/android/src/main/java/io/getstream/rn/callingx/ResourceUtils.kt +60 -0
  181. package/android/src/main/java/io/getstream/rn/callingx/Utils.kt +23 -0
  182. package/android/src/main/java/io/getstream/rn/callingx/model/Call.kt +57 -0
  183. package/android/src/main/java/io/getstream/rn/callingx/model/CallAction.kt +36 -0
  184. package/android/src/main/java/io/getstream/rn/callingx/notifications/CallNotificationManager.kt +215 -0
  185. package/android/src/main/java/io/getstream/rn/callingx/notifications/NotificationChannelsManager.kt +113 -0
  186. package/android/src/main/java/io/getstream/rn/callingx/notifications/NotificationIntentFactory.kt +105 -0
  187. package/android/src/main/java/io/getstream/rn/callingx/notifications/NotificationReceiverActivity.kt +42 -0
  188. package/android/src/main/java/io/getstream/rn/callingx/notifications/NotificationReceiverService.kt +56 -0
  189. package/android/src/main/java/io/getstream/rn/callingx/notifications/NotificationsConfig.kt +116 -0
  190. package/android/src/main/java/io/getstream/rn/callingx/repo/CallRepository.kt +163 -0
  191. package/android/src/main/java/io/getstream/rn/callingx/repo/LegacyCallRepository.kt +134 -0
  192. package/android/src/main/java/io/getstream/rn/callingx/repo/TelecomCallRepository.kt +438 -0
  193. package/android/src/main/res/drawable/ic_phone_paused_24.xml +11 -0
  194. package/android/src/main/res/drawable/ic_round_call_24.xml +11 -0
  195. package/android/src/main/res/drawable/ic_user.xml +27 -0
  196. package/dist/module/CallingxModule.js +191 -0
  197. package/dist/module/CallingxModule.js.map +1 -0
  198. package/dist/module/EventManager.js +40 -0
  199. package/dist/module/EventManager.js.map +1 -0
  200. package/dist/module/index.js +5 -0
  201. package/dist/module/index.js.map +1 -0
  202. package/dist/module/package.json +1 -0
  203. package/dist/module/spec/NativeCallingx.js +8 -0
  204. package/dist/module/spec/NativeCallingx.js.map +1 -0
  205. package/dist/module/types.js +4 -0
  206. package/dist/module/types.js.map +1 -0
  207. package/dist/module/utils/constants.js +48 -0
  208. package/dist/module/utils/constants.js.map +1 -0
  209. package/dist/module/utils/headlessTask.js +37 -0
  210. package/dist/module/utils/headlessTask.js.map +1 -0
  211. package/dist/module/utils/permissions.js +86 -0
  212. package/dist/module/utils/permissions.js.map +1 -0
  213. package/dist/module/utils/types.js +2 -0
  214. package/dist/module/utils/types.js.map +1 -0
  215. package/dist/module/utils/utils.js +6 -0
  216. package/dist/module/utils/utils.js.map +1 -0
  217. package/dist/typescript/package.json +1 -0
  218. package/dist/typescript/src/CallingxModule.d.ts +44 -0
  219. package/dist/typescript/src/CallingxModule.d.ts.map +1 -0
  220. package/dist/typescript/src/EventManager.d.ts +11 -0
  221. package/dist/typescript/src/EventManager.d.ts.map +1 -0
  222. package/dist/typescript/src/index.d.ts +3 -0
  223. package/dist/typescript/src/index.d.ts.map +1 -0
  224. package/dist/typescript/src/spec/NativeCallingx.d.ts +132 -0
  225. package/dist/typescript/src/spec/NativeCallingx.d.ts.map +1 -0
  226. package/dist/typescript/src/types.d.ts +249 -0
  227. package/dist/typescript/src/types.d.ts.map +1 -0
  228. package/dist/typescript/src/utils/constants.d.ts +8 -0
  229. package/dist/typescript/src/utils/constants.d.ts.map +1 -0
  230. package/dist/typescript/src/utils/headlessTask.d.ts +8 -0
  231. package/dist/typescript/src/utils/headlessTask.d.ts.map +1 -0
  232. package/dist/typescript/src/utils/permissions.d.ts +8 -0
  233. package/dist/typescript/src/utils/permissions.d.ts.map +1 -0
  234. package/dist/typescript/src/utils/types.d.ts +4 -0
  235. package/dist/typescript/src/utils/types.d.ts.map +1 -0
  236. package/dist/typescript/src/utils/utils.d.ts +2 -0
  237. package/dist/typescript/src/utils/utils.d.ts.map +1 -0
  238. package/ios/AudioSessionManager.swift +46 -0
  239. package/ios/Callingx.mm +280 -0
  240. package/ios/CallingxImpl.swift +744 -0
  241. package/ios/CallingxPublic.h +79 -0
  242. package/ios/Settings.swift +108 -0
  243. package/ios/UUIDStorage.swift +124 -0
  244. package/ios/VoipNotificationsManager.swift +180 -0
  245. package/package.json +112 -0
  246. package/react-native.config.js +8 -0
  247. package/src/CallingxModule.ts +321 -0
  248. package/src/EventManager.ts +61 -0
  249. package/src/index.ts +2 -0
  250. package/src/spec/NativeCallingx.ts +176 -0
  251. package/src/types.ts +323 -0
  252. package/src/utils/constants.ts +55 -0
  253. package/src/utils/headlessTask.ts +52 -0
  254. package/src/utils/permissions.ts +111 -0
  255. package/src/utils/types.ts +5 -0
  256. package/src/utils/utils.ts +6 -0
@@ -0,0 +1,23 @@
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = "Callingx"
7
+ s.version = package["version"]
8
+ s.summary = package["description"]
9
+ s.homepage = package["homepage"]
10
+ s.license = package["license"]
11
+ s.authors = package["author"]
12
+
13
+ s.platforms = { :ios => min_ios_version_supported }
14
+ s.source = { :git => "https://github.com/GetStream/stream-video-js/tree/main/packages/react-native-callingx.git", :tag => "#{s.version}" }
15
+
16
+ s.source_files = "ios/**/*.{h,m,mm,swift}"
17
+ s.public_header_files = "ios/CallingxPublic.h"
18
+ s.swift_version = "5.0"
19
+
20
+ s.dependency "stream-react-native-webrtc"
21
+
22
+ install_modules_dependencies(s)
23
+ end
package/LICENSE ADDED
@@ -0,0 +1,219 @@
1
+ SOURCE CODE LICENSE AGREEMENT
2
+
3
+ IMPORTANT - READ THIS CAREFULLY BEFORE DOWNLOADING, INSTALLING, USING OR
4
+ ELECTRONICALLY ACCESSING THIS PROPRIETARY PRODUCT.
5
+
6
+ THIS IS A LEGAL AGREEMENT BETWEEN STREAM.IO, INC. (“STREAM.IO”) AND THE
7
+ BUSINESS ENTITY OR PERSON FOR WHOM YOU (“YOU”) ARE ACTING (“CUSTOMER”) AS THE
8
+ LICENSEE OF THE PROPRIETARY SOFTWARE INTO WHICH THIS AGREEMENT HAS BEEN
9
+ INCLUDED (THE “AGREEMENT”). YOU AGREE THAT YOU ARE THE CUSTOMER, OR YOU ARE AN
10
+ EMPLOYEE OR AGENT OF CUSTOMER AND ARE ENTERING INTO THIS AGREEMENT FOR LICENSE
11
+ OF THE SOFTWARE BY CUSTOMER FOR CUSTOMER’S BUSINESS PURPOSES AS DESCRIBED IN
12
+ AND IN ACCORDANCE WITH THIS AGREEMENT. YOU HEREBY AGREE THAT YOU ENTER INTO
13
+ THIS AGREEMENT ON BEHALF OF CUSTOMER AND THAT YOU HAVE THE AUTHORITY TO BIND
14
+ CUSTOMER TO THIS AGREEMENT.
15
+
16
+ STREAM.IO IS WILLING TO LICENSE THE SOFTWARE TO CUSTOMER ONLY ON THE FOLLOWING
17
+ CONDITIONS: (1) YOU ARE A CURRENT CUSTOMER OF STREAM.IO; (2) YOU ARE NOT A
18
+ COMPETITOR OF STREAM.IO; AND (3) THAT YOU ACCEPT ALL THE TERMS IN THIS
19
+ AGREEMENT. BY DOWNLOADING, INSTALLING, CONFIGURING, ACCESSING OR OTHERWISE
20
+ USING THE SOFTWARE, INCLUDING ANY UPDATES, UPGRADES, OR NEWER VERSIONS, YOU
21
+ REPRESENT, WARRANT AND ACKNOWLEDGE THAT (A) CUSTOMER IS A CURRENT CUSTOMER OF
22
+ STREAM.IO; (B) CUSTOMER IS NOT A COMPETITOR OF STREAM.IO; AND THAT (C) YOU HAVE
23
+ READ THIS AGREEMENT, UNDERSTAND THIS AGREEMENT, AND THAT CUSTOMER AGREES TO BE
24
+ BOUND BY ALL THE TERMS OF THIS AGREEMENT.
25
+
26
+ IF YOU DO NOT AGREE TO ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT,
27
+ STREAM.IO IS UNWILLING TO LICENSE THE SOFTWARE TO CUSTOMER, AND THEREFORE, DO
28
+ NOT COMPLETE THE DOWNLOAD PROCESS, ACCESS OR OTHERWISE USE THE SOFTWARE, AND
29
+ CUSTOMER SHOULD IMMEDIATELY RETURN THE SOFTWARE AND CEASE ANY USE OF THE
30
+ SOFTWARE.
31
+
32
+ 1. SOFTWARE. The Stream.io software accompanying this Agreement, may include
33
+ Source Code, Executable Object Code, associated media, printed materials and
34
+ documentation (collectively, the “Software”). The Software also includes any
35
+ updates or upgrades to or new versions of the original Software, if and when
36
+ made available to you by Stream.io. “Source Code” means computer programming
37
+ code in human readable form that is not suitable for machine execution without
38
+ the intervening steps of interpretation or compilation. “Executable Object
39
+ Code" means the computer programming code in any other form than Source Code
40
+ that is not readily perceivable by humans and suitable for machine execution
41
+ without the intervening steps of interpretation or compilation. “Site” means a
42
+ Customer location controlled by Customer. “Authorized User” means any employee
43
+ or contractor of Customer working at the Site, who has signed a written
44
+ confidentiality agreement with Customer or is otherwise bound in writing by
45
+ confidentiality and use obligations at least as restrictive as those imposed
46
+ under this Agreement.
47
+
48
+ 2. LICENSE GRANT. Subject to the terms and conditions of this Agreement, in
49
+ consideration for the representations, warranties, and covenants made by
50
+ Customer in this Agreement, Stream.io grants to Customer, during the term of
51
+ this Agreement, a personal, non-exclusive, non-transferable, non-sublicensable
52
+ license to:
53
+
54
+ a. install and use Software Source Code on password protected computers at a Site,
55
+ restricted to Authorized Users;
56
+
57
+ b. create derivative works, improvements (whether or not patentable), extensions
58
+ and other modifications to the Software Source Code (“Modifications”) to build
59
+ unique scalable newsfeeds, activity streams, and in-app messaging via Stream’s
60
+ application program interface (“API”);
61
+
62
+ c. compile the Software Source Code to create Executable Object Code versions of
63
+ the Software Source Code and Modifications to build such newsfeeds, activity
64
+ streams, and in-app messaging via the API;
65
+
66
+ d. install, execute and use such Executable Object Code versions solely for
67
+ Customer’s internal business use (including development of websites through
68
+ which data generated by Stream services will be streamed (“Apps”));
69
+
70
+ e. use and distribute such Executable Object Code as part of Customer’s Apps; and
71
+
72
+ f. make electronic copies of the Software and Modifications as required for backup
73
+ or archival purposes.
74
+
75
+ 3. RESTRICTIONS. Customer is responsible for all activities that occur in
76
+ connection with the Software. Customer will not, and will not attempt to: (a)
77
+ sublicense or transfer the Software or any Source Code related to the Software
78
+ or any of Customer’s rights under this Agreement, except as otherwise provided
79
+ in this Agreement, (b) use the Software Source Code for the benefit of a third
80
+ party or to operate a service; (c) allow any third party to access or use the
81
+ Software Source Code; (d) sublicense or distribute the Software Source Code or
82
+ any Modifications in Source Code or other derivative works based on any part of
83
+ the Software Source Code; (e) use the Software in any manner that competes with
84
+ Stream.io or its business; or (e) otherwise use the Software in any manner that
85
+ exceeds the scope of use permitted in this Agreement. Customer shall use the
86
+ Software in compliance with any accompanying documentation any laws applicable
87
+ to Customer.
88
+
89
+ 4. OPEN SOURCE. Customer and its Authorized Users shall not use any software or
90
+ software components that are open source in conjunction with the Software
91
+ Source Code or any Modifications in Source Code or in any way that could
92
+ subject the Software to any open source licenses.
93
+
94
+ 5. CONTRACTORS. Under the rights granted to Customer under this Agreement,
95
+ Customer may permit its employees, contractors, and agencies of Customer to
96
+ become Authorized Users to exercise the rights to the Software granted to
97
+ Customer in accordance with this Agreement solely on behalf of Customer to
98
+ provide services to Customer; provided that Customer shall be liable for the
99
+ acts and omissions of all Authorized Users to the extent any of such acts or
100
+ omissions, if performed by Customer, would constitute a breach of, or otherwise
101
+ give rise to liability to Customer under, this Agreement. Customer shall not
102
+ and shall not permit any Authorized User to use the Software except as
103
+ expressly permitted in this Agreement.
104
+
105
+ 6. COMPETITIVE PRODUCT DEVELOPMENT. Customer shall not use the Software in any way
106
+ to engage in the development of products or services which could be reasonably
107
+ construed to provide a complete or partial functional or commercial alternative
108
+ to Stream.io’s products or services (a “Competitive Product”). Customer shall
109
+ ensure that there is no direct or indirect use of, or sharing of, Software
110
+ source code, or other information based upon or derived from the Software to
111
+ develop such products or services. Without derogating from the generality of
112
+ the foregoing, development of Competitive Products shall include having direct
113
+ or indirect access to, supervising, consulting or assisting in the development
114
+ of, or producing any specifications, documentation, object code or source code
115
+ for, all or part of a Competitive Product.
116
+
117
+ 7. LIMITATION ON MODIFICATIONS. Notwithstanding any provision in this Agreement,
118
+ Modifications may only be created and used by Customer as permitted by this
119
+ Agreement and Modification Source Code may not be distributed to third parties.
120
+ Customer will not assert against Stream.io, its affiliates, or their customers,
121
+ direct or indirect, agents and contractors, in any way, any patent rights that
122
+ Customer may obtain relating to any Modifications for Stream.io, its
123
+ affiliates’, or their customers’, direct or indirect, agents’ and contractors’
124
+ manufacture, use, import, offer for sale or sale of any Stream.io products or
125
+ services.
126
+
127
+ 8. DELIVERY AND ACCEPTANCE. The Software will be delivered electronically pursuant
128
+ to Stream.io standard download procedures. The Software is deemed accepted upon
129
+ delivery.
130
+
131
+ 9. IMPLEMENTATION AND SUPPORT. Stream.io has no obligation under this Agreement to
132
+ provide any support or consultation concerning the Software.
133
+
134
+ 10. TERM AND TERMINATION. The term of this Agreement begins when the Software is
135
+ downloaded or accessed and shall continue until terminated. Either party may
136
+ terminate this Agreement upon written notice. This Agreement shall
137
+ automatically terminate if Customer is or becomes a competitor of Stream.io or
138
+ makes or sells any Competitive Products. Upon termination of this Agreement for
139
+ any reason, (a) all rights granted to Customer in this Agreement immediately
140
+ cease to exist, (b) Customer must promptly discontinue all use of the Software
141
+ and return to Stream.io or destroy all copies of the Software in Customer’s
142
+ possession or control. Any continued use of the Software by Customer or attempt
143
+ by Customer to exercise any rights under this Agreement after this Agreement
144
+ has terminated shall be considered copyright infringement and subject Customer
145
+ to applicable remedies for copyright infringement. Sections 2, 5, 6, 8 and 9
146
+ shall survive expiration or termination of this Agreement for any reason.
147
+
148
+ 11. OWNERSHIP. As between the parties, the Software and all worldwide intellectual
149
+ property rights and proprietary rights relating thereto or embodied therein,
150
+ are the exclusive property of Stream.io and its suppliers. Stream.io and its
151
+ suppliers reserve all rights in and to the Software not expressly granted to
152
+ Customer in this Agreement, and no other licenses or rights are granted by
153
+ implication, estoppel or otherwise.
154
+
155
+ 12. WARRANTY DISCLAIMER. USE OF THIS SOFTWARE IS ENTIRELY AT YOURS AND CUSTOMER’S
156
+ OWN RISK. THE SOFTWARE IS PROVIDED “AS IS” WITHOUT ANY WARRANTY OF ANY KIND
157
+ WHATSOEVER. STREAM.IO DOES NOT MAKE, AND HEREBY DISCLAIMS, ANY WARRANTY OF ANY
158
+ KIND, WHETHER EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING WITHOUT
159
+ LIMITATION, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
160
+ PURPOSE, TITLE, NON-INFRINGEMENT OF THIRD-PARTY RIGHTS, RESULTS, EFFORTS,
161
+ QUALITY OR QUIET ENJOYMENT. STREAM.IO DOES NOT WARRANT THAT THE SOFTWARE IS
162
+ ERROR-FREE, WILL FUNCTION WITHOUT INTERRUPTION, WILL MEET ANY SPECIFIC NEED
163
+ THAT CUSTOMER HAS, THAT ALL DEFECTS WILL BE CORRECTED OR THAT IT IS
164
+ SUFFICIENTLY DOCUMENTED TO BE USABLE BY CUSTOMER. TO THE EXTENT THAT STREAM.IO
165
+ MAY NOT DISCLAIM ANY WARRANTY AS A MATTER OF APPLICABLE LAW, THE SCOPE AND
166
+ DURATION OF SUCH WARRANTY WILL BE THE MINIMUM PERMITTED UNDER SUCH LAW.
167
+ CUSTOMER ACKNOWLEDGES THAT IT HAS RELIED ON NO WARRANTIES OTHER THAN THE
168
+ EXPRESS WARRANTIES IN THIS AGREEMENT.
169
+
170
+ 13. LIMITATION OF LIABILITY. TO THE FULLEST EXTENT PERMISSIBLE BY LAW, STREAM.IO’S
171
+ TOTAL LIABILITY FOR ALL DAMAGES ARISING OUT OF OR RELATED TO THE SOFTWARE OR
172
+ THIS AGREEMENT, WHETHER IN CONTRACT, TORT (INCLUDING NEGLIGENCE) OR OTHERWISE,
173
+ SHALL NOT EXCEED $100. IN NO EVENT WILL STREAM.IO BE LIABLE FOR ANY INDIRECT,
174
+ CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES OF ANY KIND
175
+ WHATSOEVER, INCLUDING ANY LOST DATA AND LOST PROFITS, ARISING FROM OR RELATING
176
+ TO THE SOFTWARE EVEN IF STREAM.IO HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
177
+ DAMAGES. CUSTOMER ACKNOWLEDGES THAT THIS PROVISION REFLECTS THE AGREED UPON
178
+ ALLOCATION OF RISK FOR THIS AGREEMENT AND THAT STREAM.IO WOULD NOT ENTER INTO
179
+ THIS AGREEMENT WITHOUT THESE LIMITATIONS ON ITS LIABILITY.
180
+
181
+ 14. General. Customer may not assign or transfer this Agreement, by operation of
182
+ law or otherwise, or any of its rights under this Agreement (including the
183
+ license rights granted to Customer) to any third party without Stream.io’s
184
+ prior written consent, which consent will not be unreasonably withheld or
185
+ delayed. Stream.io may assign this Agreement, without consent, including, but
186
+ limited to, affiliate or any successor to all or substantially all its business
187
+ or assets to which this Agreement relates, whether by merger, sale of assets,
188
+ sale of stock, reorganization or otherwise. Any attempted assignment or
189
+ transfer in violation of the foregoing will be null and void. Stream.io shall
190
+ not be liable hereunder by reason of any failure or delay in the performance of
191
+ its obligations hereunder for any cause which is beyond the reasonable control.
192
+ All notices, consents, and approvals under this Agreement must be delivered in
193
+ writing by courier, by electronic mail, or by certified or registered mail,
194
+ (postage prepaid and return receipt requested) to the other party at the
195
+ address set forth in the customer agreement between Stream.io and Customer and
196
+ will be effective upon receipt or when delivery is refused. This Agreement will
197
+ be governed by and interpreted in accordance with the laws of the State of
198
+ Colorado, without reference to its choice of laws rules. The United Nations
199
+ Convention on Contracts for the International Sale of Goods does not apply to
200
+ this Agreement. Any action or proceeding arising from or relating to this
201
+ Agreement shall be brought in a federal or state court in Denver, Colorado, and
202
+ each party irrevocably submits to the jurisdiction and venue of any such court
203
+ in any such action or proceeding. All waivers must be in writing. Any waiver or
204
+ failure to enforce any provision of this Agreement on one occasion will not be
205
+ deemed a waiver of any other provision or of such provision on any other
206
+ occasion. If any provision of this Agreement is unenforceable, such provision
207
+ will be changed and interpreted to accomplish the objectives of such provision
208
+ to the greatest extent possible under applicable law and the remaining
209
+ provisions will continue in full force and effect. Customer shall not violate
210
+ any applicable law, rule or regulation, including those regarding the export of
211
+ technical data. The headings of Sections of this Agreement are for convenience
212
+ and are not to be used in interpreting this Agreement. As used in this
213
+ Agreement, the word “including” means “including but not limited to.” This
214
+ Agreement (including all exhibits and attachments) constitutes the entire
215
+ agreement between the parties regarding the subject hereof and supersedes all
216
+ prior or contemporaneous agreements, understandings and communication, whether
217
+ written or oral. This Agreement may be amended only by a written document
218
+ signed by both parties. The terms of any purchase order or similar document
219
+ submitted by Customer to Stream.io will have no effect.
package/README.md ADDED
@@ -0,0 +1,392 @@
1
+ # react-native-callingx
2
+
3
+ A React Native Turbo Module for seamless native calling integration. This library provides a unified API to integrate with **CallKit** on iOS and the **Telecom/ConnectionService** API on Android, enabling your app to display system-level calling UI and interact with native call controls.
4
+
5
+ ## Features
6
+
7
+ - 📞 **Incoming call UI** — Display native incoming call screens (even when the app is killed)
8
+ - 📲 **Outgoing call registration** — Register outgoing calls with the system
9
+ - 🎛️ **Call controls** — Mute, hold, end calls with native system integration
10
+ - 🔔 **Custom notifications** — Configurable Android notification channels
11
+ - ⚡ **Turbo Module** — Built with the New Architecture for optimal performance
12
+ - 📱 **Background support** — Handle calls when the app is backgrounded or killed
13
+
14
+ ## Requirements
15
+
16
+ - React Native 0.73+ (New Architecture / Turbo Modules)
17
+ - iOS 13.0+
18
+ - Android API 26+ (Android 8.0 Oreo)
19
+
20
+ ## Installation
21
+
22
+ ```sh
23
+ npm install @stream-io/react-native-callingx
24
+ # or
25
+ yarn add @stream-io/react-native-callingx
26
+ ```
27
+
28
+ ### iOS Setup
29
+
30
+ 1. Add the required background modes to your `Info.plist`:
31
+
32
+ ```xml
33
+ <key>UIBackgroundModes</key>
34
+ <array>
35
+ <string>voip</string>
36
+ <string>audio</string>
37
+ </array>
38
+ ```
39
+
40
+ 2. Run pod install:
41
+
42
+ ```sh
43
+ cd ios && pod install
44
+ ```
45
+
46
+ 3. For VoIP push notifications, configure your `AppDelegate` to report incoming calls:
47
+
48
+ ```objc
49
+ #import <Callingx/CallingxPublic.h>
50
+
51
+ - (void)pushRegistry:(PKPushRegistry *)registry
52
+ didReceiveIncomingPushWithPayload:(PKPushPayload *)payload
53
+ forType:(PKPushType)type
54
+ withCompletionHandler:(void (^)(void))completion {
55
+
56
+ // Extract call information from payload
57
+ NSString *callId = payload.dictionaryPayload[@"call_id"];
58
+ NSString *callerName = payload.dictionaryPayload[@"caller_name"];
59
+ NSString *handle = payload.dictionaryPayload[@"handle"];
60
+ BOOL hasVideo = [payload.dictionaryPayload[@"has_video"] boolValue];
61
+
62
+ [Callingx reportNewIncomingCall:callId
63
+ handle:handle
64
+ handleType:@"generic"
65
+ hasVideo:hasVideo
66
+ localizedCallerName:callerName
67
+ supportsHolding:YES
68
+ supportsDTMF:NO
69
+ supportsGrouping:NO
70
+ supportsUngrouping:NO
71
+ fromPushKit:YES
72
+ payload:payload.dictionaryPayload
73
+ withCompletionHandler:completion];
74
+ }
75
+ ```
76
+
77
+ ### Android Setup
78
+
79
+ ## Usage
80
+
81
+ ### Setup
82
+
83
+ Initialize the module with platform-specific configuration:
84
+
85
+ ```typescript
86
+ import { CallingxModule } from 'react-native-callingx';
87
+
88
+ // Setup must be called before any other method
89
+ CallingxModule.setup({
90
+ ios: {
91
+ appName: 'My App',
92
+ supportsVideo: true,
93
+ maximumCallsPerCallGroup: 1,
94
+ maximumCallGroups: 1,
95
+ handleType: 'generic', // 'generic' | 'number' | 'phone' | 'email'
96
+ },
97
+ android: {
98
+ incomingChannel: {
99
+ id: 'incoming_calls',
100
+ name: 'Incoming Calls',
101
+ sound: 'ringtone', // optional custom sound
102
+ vibration: true,
103
+ },
104
+ outgoingChannel: {
105
+ id: 'ongoing_calls',
106
+ name: 'Ongoing Calls',
107
+ },
108
+ // Optional: transform display text
109
+ titleTransformer: (name) => `Call from ${name}`,
110
+ subtitleTransformer: (phoneNumber) => phoneNumber,
111
+ },
112
+ });
113
+ ```
114
+
115
+ ### Request Permissions
116
+
117
+ Before displaying calls, request the required permissions:
118
+
119
+ ```typescript
120
+ const permissions = await CallingxModule.requestPermissions();
121
+ console.log('Audio permission:', permissions.recordAudio);
122
+ console.log('Notification permission:', permissions.postNotifications);
123
+ ```
124
+
125
+ ### Display Incoming Call
126
+
127
+ Show the native incoming call UI:
128
+
129
+ ```typescript
130
+ await CallingxModule.displayIncomingCall(
131
+ 'unique-call-id',
132
+ '+1234567890', // phone number / handle
133
+ 'John Doe', // caller name
134
+ true, // has video
135
+ );
136
+ ```
137
+
138
+ ### Start Outgoing Call
139
+
140
+ Register an outgoing call with the system:
141
+
142
+ ```typescript
143
+ await CallingxModule.startCall(
144
+ 'unique-call-id',
145
+ '+1234567890',
146
+ 'John Doe',
147
+ false, // audio only
148
+ );
149
+ ```
150
+
151
+ ### Answer Call
152
+
153
+ Answer an incoming call programmatically:
154
+
155
+ ```typescript
156
+ await CallingxModule.answerIncomingCall('unique-call-id');
157
+ ```
158
+
159
+ ### Activate Call
160
+
161
+ Mark a call as active (connected):
162
+
163
+ ```typescript
164
+ await CallingxModule.setCurrentCallActive('unique-call-id');
165
+ ```
166
+
167
+ ### End Call
168
+
169
+ End a call with a specific reason:
170
+
171
+ ```typescript
172
+ import type { EndCallReason } from 'react-native-callingx';
173
+
174
+ // Available reasons: 'local' | 'remote' | 'rejected' | 'busy' |
175
+ // 'answeredElsewhere' | 'missed' | 'error'
176
+ await CallingxModule.endCallWithReason('unique-call-id', 'remote');
177
+ ```
178
+
179
+ ### Mute/Unmute
180
+
181
+ Toggle call mute state:
182
+
183
+ ```typescript
184
+ await CallingxModule.setMutedCall('unique-call-id', true); // mute
185
+ await CallingxModule.setMutedCall('unique-call-id', false); // unmute
186
+ ```
187
+
188
+ ### Hold/Unhold
189
+
190
+ Toggle call hold state:
191
+
192
+ ```typescript
193
+ await CallingxModule.setOnHoldCall('unique-call-id', true); // hold
194
+ await CallingxModule.setOnHoldCall('unique-call-id', false); // unhold
195
+ ```
196
+
197
+ ### Update Display
198
+
199
+ Update the caller information during a call:
200
+
201
+ ```typescript
202
+ await CallingxModule.updateDisplay(
203
+ 'unique-call-id',
204
+ '+1234567890',
205
+ 'Updated Name',
206
+ );
207
+ ```
208
+
209
+ ### Event Listeners
210
+
211
+ Subscribe to call events:
212
+
213
+ ```typescript
214
+ import { CallingxModule } from 'react-native-callingx';
215
+ import type { EventName } from 'react-native-callingx';
216
+
217
+ // Answer event - user answered from system UI
218
+ const answerSubscription = CallingxModule.addEventListener(
219
+ 'answerCall',
220
+ (params) => {
221
+ console.log('Call answered:', params.callId);
222
+ },
223
+ );
224
+
225
+ // End event - call ended
226
+ const endSubscription = CallingxModule.addEventListener('endCall', (params) => {
227
+ console.log('Call ended:', params.callId, 'Cause:', params.cause);
228
+ });
229
+
230
+ // Hold toggle event
231
+ const holdSubscription = CallingxModule.addEventListener(
232
+ 'didToggleHoldCallAction',
233
+ (params) => {
234
+ console.log('Hold toggled:', params.callId, 'On hold:', params.hold);
235
+ },
236
+ );
237
+
238
+ // Mute toggle event
239
+ const muteSubscription = CallingxModule.addEventListener(
240
+ 'didPerformSetMutedCallAction',
241
+ (params) => {
242
+ console.log('Mute toggled:', params.callId, 'Muted:', params.muted);
243
+ },
244
+ );
245
+
246
+ // Start call action (outgoing call initiated from system)
247
+ const startSubscription = CallingxModule.addEventListener(
248
+ 'didReceiveStartCallAction',
249
+ (params) => {
250
+ console.log('Start call action:', params.callId);
251
+ },
252
+ );
253
+
254
+ // Clean up when done
255
+ answerSubscription.remove();
256
+ endSubscription.remove();
257
+ // ... remove other subscriptions
258
+ ```
259
+
260
+ ### Handle Initial Events
261
+
262
+ When the app is launched from a killed state by a call action, retrieve queued events:
263
+
264
+ ```typescript
265
+ // Get events that occurred before the module was initialized
266
+ const initialEvents = CallingxModule.getInitialEvents();
267
+ initialEvents.forEach((event) => {
268
+ console.log('Initial event:', event.eventName, event.params);
269
+ });
270
+
271
+ // Clear initial events after processing
272
+ await CallingxModule.clearInitialEvents();
273
+ ```
274
+
275
+ ### Background Tasks (Android)
276
+
277
+ Run background tasks for call-related operations:
278
+
279
+ ```typescript
280
+ // Start a managed background task
281
+ await CallingxModule.startBackgroundTask(async (taskData, stopTask) => {
282
+ try {
283
+ // Perform background work (e.g., connect to call server)
284
+ await connectToCallServer();
285
+ } finally {
286
+ stopTask(); // Always call when done
287
+ }
288
+ });
289
+
290
+ // Or stop manually
291
+ await CallingxModule.stopBackgroundTask();
292
+ ```
293
+
294
+ ## API Reference
295
+
296
+ ### CallingxModule
297
+
298
+ | Method | Description |
299
+ | ---------------------------------------------------------------- | ---------------------------------------------------- |
300
+ | `setup(options)` | Initialize the module with platform-specific options |
301
+ | `requestPermissions()` | Request required permissions (audio, notifications) |
302
+ | `checkPermissions()` | Check current permission status |
303
+ | `displayIncomingCall(callId, phoneNumber, callerName, hasVideo)` | Display incoming call UI |
304
+ | `answerIncomingCall(callId)` | Answer an incoming call |
305
+ | `startCall(callId, phoneNumber, callerName, hasVideo)` | Register an outgoing call |
306
+ | `setCurrentCallActive(callId)` | Mark call as active/connected |
307
+ | `updateDisplay(callId, phoneNumber, callerName)` | Update caller display info |
308
+ | `endCallWithReason(callId, reason)` | End call with specified reason |
309
+ | `setMutedCall(callId, isMuted)` | Toggle call mute state |
310
+ | `setOnHoldCall(callId, isOnHold)` | Toggle call hold state |
311
+ | `addEventListener(eventName, callback)` | Subscribe to call events |
312
+ | `getInitialEvents()` | Get queued events from app launch |
313
+ | `clearInitialEvents()` | Clear queued initial events |
314
+ | `startBackgroundTask(taskProvider)` | Start Android background task |
315
+ | `stopBackgroundTask()` | Stop Android background task |
316
+ | `log(message, level)` | Log message to native console |
317
+
318
+ ### Events
319
+
320
+ | Event | Parameters | Description |
321
+ | ------------------------------ | ------------------- | --------------------------------- |
322
+ | `answerCall` | `{ callId }` | User answered call from system UI |
323
+ | `endCall` | `{ callId, cause }` | Call ended |
324
+ | `didToggleHoldCallAction` | `{ callId, hold }` | Hold state changed |
325
+ | `didPerformSetMutedCallAction` | `{ callId, muted }` | Mute state changed |
326
+ | `didReceiveStartCallAction` | `{ callId }` | Outgoing call action received |
327
+
328
+ ### Types
329
+
330
+ ```typescript
331
+ type EndCallReason =
332
+ | 'local' // Call ended by local user
333
+ | 'remote' // Call ended by remote party
334
+ | 'rejected' // Call was rejected
335
+ | 'busy' // Remote party is busy
336
+ | 'answeredElsewhere' // Answered on another device
337
+ | 'missed' // Call was missed
338
+ | 'error'; // Call failed due to error
339
+
340
+ type CallingExpiOSOptions = {
341
+ appName: string;
342
+ supportsVideo?: boolean;
343
+ maximumCallsPerCallGroup?: number;
344
+ maximumCallGroups?: number;
345
+ handleType?: 'generic' | 'number' | 'phone' | 'email';
346
+ };
347
+
348
+ type CallingExpAndroidOptions = {
349
+ incomingChannel?: {
350
+ id: string;
351
+ name: string;
352
+ sound?: string;
353
+ vibration?: boolean;
354
+ };
355
+ outgoingChannel?: {
356
+ id: string;
357
+ name: string;
358
+ sound?: string;
359
+ vibration?: boolean;
360
+ };
361
+ };
362
+
363
+ type PermissionsResult = {
364
+ recordAudio: boolean;
365
+ postNotifications: boolean;
366
+ };
367
+ ```
368
+
369
+ ## Troubleshooting
370
+
371
+ ### iOS
372
+
373
+ - **Incoming call not showing**: Ensure `voip` background mode is enabled and VoIP push certificate is configured
374
+ - **CallKit errors**: Check that `appName` is set in setup options
375
+ - **Audio issues**: The module automatically configures the audio session, but ensure no conflicts with other audio libraries
376
+
377
+ ### Android
378
+
379
+ - **Notifications not showing**: Check POST_NOTIFICATIONS permission on Android 13+
380
+ - **Call not answered on tap**: Ensure `handleCallingIntent` is called in both `onCreate` and `onNewIntent` in your MainActivity
381
+
382
+ ## Contributing
383
+
384
+ See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
385
+
386
+ ## License
387
+
388
+ MIT
389
+
390
+ ---
391
+
392
+ Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
@@ -0,0 +1,28 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ cmake_minimum_required(VERSION 3.13)
7
+ set(CMAKE_VERBOSE_MAKEFILE on)
8
+
9
+ file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/CallingxSpec/*.cpp)
10
+
11
+ add_library(
12
+ react_codegen_CallingxSpec
13
+ OBJECT
14
+ ${react_codegen_SRCS}
15
+ )
16
+
17
+ target_include_directories(react_codegen_CallingxSpec PUBLIC . react/renderer/components/CallingxSpec)
18
+
19
+ target_link_libraries(
20
+ react_codegen_CallingxSpec
21
+ fbjni
22
+ jsi
23
+ # We need to link different libraries based on whether we are building rncore or not, that's necessary
24
+ # because we want to break a circular dependency between react_codegen_rncore and reactnative
25
+ reactnative
26
+ )
27
+
28
+ target_compile_reactnative_options(react_codegen_CallingxSpec PRIVATE)