@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,438 @@
1
+ package io.getstream.rn.callingx.repo
2
+
3
+ import android.content.Context
4
+ import android.net.Uri
5
+ import android.os.Build
6
+ import android.os.Bundle
7
+ import android.telecom.DisconnectCause
8
+ import android.util.Log
9
+ import androidx.annotation.RequiresApi
10
+ import androidx.core.telecom.CallAttributesCompat
11
+ import androidx.core.telecom.CallControlResult
12
+ import androidx.core.telecom.CallControlScope
13
+ import androidx.core.telecom.CallsManager
14
+ import io.getstream.rn.callingx.debugLog
15
+ import io.getstream.rn.callingx.model.Call
16
+ import io.getstream.rn.callingx.model.CallAction
17
+ import kotlinx.coroutines.Job
18
+ import kotlinx.coroutines.cancel
19
+ import kotlinx.coroutines.channels.Channel
20
+ import kotlinx.coroutines.flow.Flow
21
+ import kotlinx.coroutines.flow.consumeAsFlow
22
+ import kotlinx.coroutines.flow.launchIn
23
+ import kotlinx.coroutines.flow.onEach
24
+ import kotlinx.coroutines.flow.scan
25
+ import kotlinx.coroutines.launch
26
+ import kotlinx.coroutines.sync.withLock
27
+
28
+ /**
29
+ * The central repository that keeps track of the current call and allows to register new calls.
30
+ *
31
+ * This class contains the main logic to integrate with Telecom SDK.
32
+ *
33
+ * @see registerCall
34
+ */
35
+ @RequiresApi(Build.VERSION_CODES.O)
36
+ class TelecomCallRepository(context: Context) : CallRepository(context) {
37
+
38
+ companion object {
39
+ private const val TAG = "[Callingx] TelecomCallRepository"
40
+ }
41
+
42
+ private var observeCallStateJob: Job? = null
43
+
44
+ private val callsManager: CallsManager
45
+ private var isSelfAnswered = false
46
+ private var isSelfDisconnected = false
47
+
48
+ init {
49
+ val capabilities =
50
+ CallsManager.CAPABILITY_SUPPORTS_CALL_STREAMING or
51
+ CallsManager.CAPABILITY_SUPPORTS_VIDEO_CALLING
52
+ callsManager =
53
+ CallsManager(context.applicationContext).apply {
54
+ registerAppWithTelecom(capabilities)
55
+ }
56
+ debugLog(TAG, "[repository] init: CallsManager created and registered")
57
+ }
58
+
59
+ override fun getTag(): String = TAG
60
+
61
+ override fun setListener(listener: Listener?) {
62
+ this._listener = listener
63
+
64
+ observeCallStateJob?.cancel()
65
+ observeCallStateJob = observeCallState()
66
+ }
67
+
68
+ override fun release() {
69
+ val currentCall = currentCall.value
70
+ if (currentCall is Call.Registered) {
71
+ currentCall.processAction(CallAction.Disconnect(DisconnectCause(DisconnectCause.LOCAL)))
72
+ }
73
+ _currentCall.value = Call.None
74
+
75
+ observeCallStateJob?.cancel()
76
+ observeCallStateJob = null
77
+ _listener = null
78
+
79
+ scope.cancel()
80
+ }
81
+
82
+ /**
83
+ * Register a new call with the provided attributes. Use the [currentCall] StateFlow to receive
84
+ * status updates and process call related actions.
85
+ */
86
+ override suspend fun registerCall(
87
+ callId: String,
88
+ displayName: String,
89
+ address: Uri,
90
+ isIncoming: Boolean,
91
+ isVideo: Boolean,
92
+ displayOptions: Bundle?,
93
+ ) {
94
+ debugLog(
95
+ TAG,
96
+ "[repository] registerCall: Starting registration - Name: $displayName, Address: $address, Incoming: $isIncoming"
97
+ )
98
+
99
+ registrationMutex.withLock {
100
+ // For simplicity we don't support multiple calls
101
+ if (_currentCall.value is Call.Registered) {
102
+ Log.w(
103
+ TAG,
104
+ "[repository] registerCall: Call already registered, ignoring new call request"
105
+ )
106
+ return@withLock
107
+ }
108
+ debugLog(
109
+ TAG,
110
+ "[repository] registerCall: No existing call found, proceeding with registration"
111
+ )
112
+
113
+ val attributes = createCallAttributes(displayName, address, isIncoming, isVideo)
114
+ val actionSource = Channel<CallAction>()
115
+
116
+ // Register the call and handle actions in the scope
117
+ try {
118
+ callsManager.addCall(
119
+ attributes,
120
+ onIsCallAnswered, // Watch needs to know if it can answer the call
121
+ onIsCallDisconnected,
122
+ onIsCallActive,
123
+ onIsCallInactive
124
+ ) {
125
+ debugLog(
126
+ TAG,
127
+ "[repository] registerCall: Inside call scope, setting up call handlers"
128
+ )
129
+
130
+ // Consume the actions to interact with the call inside the scope
131
+ launch { processCallActions(actionSource.consumeAsFlow()) }
132
+
133
+ // Update the state to registered with default values while waiting for Telecom
134
+ // updates
135
+ debugLog(
136
+ TAG,
137
+ "[repository] registerCall: Creating Registered call state with ID: $callId"
138
+ )
139
+ _currentCall.value =
140
+ Call.Registered(
141
+ id = callId,
142
+ isActive = false, // can we just register the call as active?
143
+ isOnHold = false,
144
+ callAttributes = attributes,
145
+ displayOptions = displayOptions,
146
+ isMuted = false,
147
+ errorCode = null,
148
+ currentCallEndpoint = null,
149
+ availableCallEndpoints = emptyList(),
150
+ actionSource = actionSource,
151
+ )
152
+ debugLog(TAG, "[repository] registerCall: Call state updated to Registered")
153
+
154
+ launch {
155
+ currentCallEndpoint.collect {
156
+ updateCurrentCall { copy(currentCallEndpoint = it) }
157
+ }
158
+ }
159
+ launch {
160
+ availableEndpoints.collect {
161
+ updateCurrentCall { copy(availableCallEndpoints = it) }
162
+ }
163
+ }
164
+ launch { isMuted.collect { updateCurrentCall { copy(isMuted = it) } } }
165
+ }
166
+ debugLog(
167
+ TAG,
168
+ "[repository] registerCall: Call successfully registered with Telecom SDK"
169
+ )
170
+ } catch (e: Exception) {
171
+ Log.e(TAG, "[repository] registerCall: Error registering call", e)
172
+ throw e
173
+ } finally {
174
+ debugLog(TAG, "[repository] registerCall: Call scope ended, setting state to None")
175
+ _currentCall.value = Call.None
176
+ }
177
+ }
178
+ }
179
+
180
+ override fun updateCall(
181
+ callId: String,
182
+ displayName: String,
183
+ address: Uri,
184
+ isVideo: Boolean,
185
+ displayOptions: Bundle?,
186
+ ) {
187
+ debugLog(
188
+ TAG,
189
+ "[repository] updateCall: Starting update - Name: $displayName, Address: $address, IsVideo: $isVideo"
190
+ )
191
+ super.updateCall(callId, displayName, address, isVideo, displayOptions)
192
+ }
193
+
194
+ private fun observeCallState(): Job {
195
+ return currentCall
196
+ .scan(Pair<Call?, Call>(null, currentCall.value)) { (_, prev), next ->
197
+ Pair(prev, next)
198
+ }
199
+ .onEach { (previous, current) ->
200
+ when {
201
+ previous is Call.None && current is Call.Registered -> {
202
+ if (!current.isIncoming()) {
203
+ _listener?.onCallRegistered(current.id)
204
+ }
205
+ }
206
+ previous is Call.Registered && current is Call.Registered -> {
207
+ if (previous.isMuted != current.isMuted) {
208
+ debugLog(
209
+ TAG,
210
+ "[repository] observeCallState: Mute changed: ${current.isMuted}"
211
+ )
212
+ _listener?.onMuteCallChanged(current.id, current.isMuted)
213
+ }
214
+ if (previous.currentCallEndpoint != current.currentCallEndpoint) {
215
+ current.currentCallEndpoint?.let {
216
+ _listener?.onCallEndpointChanged(current.id, it.name.toString())
217
+ }
218
+ }
219
+ }
220
+ }
221
+ _listener?.onCallStateChanged(current)
222
+ }
223
+ .launchIn(scope)
224
+ }
225
+
226
+ /** Collect the action source to handle client actions inside the call scope */
227
+ private suspend fun CallControlScope.processCallActions(actionSource: Flow<CallAction>) {
228
+ actionSource.collect { action ->
229
+ debugLog(TAG, "[repository] processCallActions: action: ${action::class.simpleName}")
230
+ when (action) {
231
+ is CallAction.Answer -> {
232
+ doAnswer(action.isAudioCall)
233
+ }
234
+ is CallAction.Disconnect -> {
235
+ doDisconnect(action)
236
+ }
237
+ is CallAction.SwitchAudioEndpoint -> {
238
+ doSwitchEndpoint(action)
239
+ }
240
+ is CallAction.TransferCall -> {
241
+ debugLog(
242
+ TAG,
243
+ "[repository] processCallActions: Transfer to endpoint: ${action.endpointId}"
244
+ )
245
+ val call = _currentCall.value as? Call.Registered
246
+ val endpoints =
247
+ call?.availableCallEndpoints?.firstOrNull {
248
+ it.identifier == action.endpointId
249
+ }
250
+ if (endpoints != null) {
251
+ requestEndpointChange(
252
+ endpoint = endpoints,
253
+ )
254
+ } else {
255
+ Log.w(
256
+ TAG,
257
+ "[repository] processCallActions: Endpoint not found for transfer, ignoring"
258
+ )
259
+ }
260
+ }
261
+ CallAction.Hold -> {
262
+ when (val result = setInactive()) {
263
+ is CallControlResult.Success -> {
264
+ onIsCallInactive()
265
+ }
266
+ is CallControlResult.Error -> {
267
+ Log.e(
268
+ TAG,
269
+ "[repository] processCallActions: Hold action failed with error code: ${result.errorCode}"
270
+ )
271
+ updateCurrentCall { copy(errorCode = result.errorCode) }
272
+ }
273
+ }
274
+ }
275
+ CallAction.Activate -> {
276
+ when (val result = setActive()) {
277
+ is CallControlResult.Success -> {
278
+ onIsCallActive()
279
+ }
280
+ is CallControlResult.Error -> {
281
+ Log.e(
282
+ TAG,
283
+ "[repository] processCallActions: Activate action failed with error code: ${result.errorCode}"
284
+ )
285
+ updateCurrentCall { copy(errorCode = result.errorCode) }
286
+ }
287
+ }
288
+ }
289
+ is CallAction.ToggleMute -> {
290
+ // We cannot programmatically mute the telecom stack. Instead we just update
291
+ // the state of the call and this will start/stop audio capturing.
292
+ debugLog(TAG, "[repository] processCallActions: Toggling mute: ${action.isMute}")
293
+ updateCurrentCall {
294
+ val newMutedState = action.isMute
295
+ copy(isMuted = newMutedState)
296
+ }
297
+ }
298
+ }
299
+ }
300
+ debugLog(TAG, "[repository] processCallActions: Action collection ended")
301
+ }
302
+
303
+
304
+ private suspend fun CallControlScope.doSwitchEndpoint(action: CallAction.SwitchAudioEndpoint) {
305
+ debugLog(TAG, "[repository] doSwitchEndpoint: Switching to endpoint: ${action.endpointId}")
306
+ if (_currentCall.value !is Call.Registered) {
307
+ Log.w(TAG, "[repository] doSwitchEndpoint: Call not registered, ignoring")
308
+ return
309
+ }
310
+ // TODO once availableCallEndpoints is a state flow we can just get the value
311
+ val endpoints = (_currentCall.value as Call.Registered).availableCallEndpoints
312
+ // Switch to the given endpoint or fallback to the best possible one.
313
+ val newEndpoint = endpoints.firstOrNull { it.identifier == action.endpointId }
314
+
315
+ if (newEndpoint != null) {
316
+ debugLog(
317
+ TAG,
318
+ "[repository] doSwitchEndpoint: Found endpoint: ${newEndpoint.name}, requesting change"
319
+ )
320
+ requestEndpointChange(newEndpoint).also {
321
+ debugLog(TAG, "[repository] doSwitchEndpoint: Endpoint change result: $it")
322
+ }
323
+ } else {
324
+ Log.w(TAG, "[repository] doSwitchEndpoint: Endpoint not found in available endpoints")
325
+ }
326
+ }
327
+
328
+ private suspend fun CallControlScope.doDisconnect(action: CallAction.Disconnect) {
329
+ isSelfDisconnected = true
330
+ debugLog(TAG, "[repository] doDisconnect: Disconnecting call with cause: ${action.cause}")
331
+ disconnect(action.cause)
332
+ debugLog(TAG, "[repository] doDisconnect: Disconnect called, triggering onIsCallDisconnected")
333
+ onIsCallDisconnected(action.cause)
334
+ }
335
+
336
+ private suspend fun CallControlScope.doAnswer(isAudioCall: Boolean) {
337
+ isSelfAnswered = true
338
+ val callType =
339
+ if (isAudioCall) CallAttributesCompat.CALL_TYPE_AUDIO_CALL
340
+ else CallAttributesCompat.CALL_TYPE_VIDEO_CALL
341
+
342
+ when (val result = answer(callType)) {
343
+ is CallControlResult.Success -> {
344
+ onIsCallAnswered(callType)
345
+ }
346
+ is CallControlResult.Error -> {
347
+ Log.e(
348
+ TAG,
349
+ "[repository] doAnswer: Answer failed with error code: ${result.errorCode}"
350
+ )
351
+ isSelfAnswered = false
352
+ updateCurrentCall {
353
+ Call.Unregistered(
354
+ id = id,
355
+ callAttributes = callAttributes,
356
+ disconnectCause = DisconnectCause(DisconnectCause.BUSY),
357
+ )
358
+ }
359
+ }
360
+ }
361
+ }
362
+
363
+ /**
364
+ * Can the call be successfully answered?? TIP: We would check the connection/call state to see
365
+ * if we can answer a call Example you may need to wait for another call to hold.
366
+ */
367
+ val onIsCallAnswered: suspend (type: Int) -> Unit = {
368
+ debugLog(
369
+ TAG,
370
+ "[repository] onIsCallAnswered: Call answered, type: $it, isSelfAnswered: $isSelfAnswered"
371
+ )
372
+ updateCurrentCall { copy(isActive = true, isOnHold = false) }
373
+
374
+ val call = _currentCall.value
375
+ val source =
376
+ if (isSelfAnswered) EventSource.APP
377
+ else EventSource.SYS
378
+ if (call is Call.Registered) {
379
+ _listener?.onIsCallAnswered(call.id, source)
380
+ }
381
+ isSelfAnswered = false
382
+ debugLog(TAG, "[repository] onIsCallAnswered: Call state updated to active")
383
+ }
384
+
385
+ /** Can the call perform a disconnect */
386
+ val onIsCallDisconnected: suspend (cause: DisconnectCause) -> Unit = {
387
+ debugLog(
388
+ TAG,
389
+ "[repository] onIsCallDisconnected: Call disconnected, cause: ${it.reason}, description: ${it.description}"
390
+ )
391
+ val source =
392
+ if (isSelfDisconnected) EventSource.APP
393
+ else EventSource.SYS
394
+ var callId: String? = null
395
+ if (_currentCall.value is Call.Registered) {
396
+ callId = (_currentCall.value as Call.Registered).id
397
+ }
398
+
399
+ updateCurrentCall { Call.Unregistered(id, callAttributes, it) }
400
+ _listener?.onIsCallDisconnected(callId, it, source)
401
+ isSelfDisconnected = false
402
+ debugLog(TAG, "[repository] onIsCallDisconnected: Call state updated to Unregistered")
403
+ }
404
+
405
+ /**
406
+ * Check is see if we can make the call active. Other calls and state might stop us from
407
+ * activating the call
408
+ */
409
+ val onIsCallActive: suspend () -> Unit = {
410
+ debugLog(TAG, "[repository] onIsCallActive: Call became active")
411
+ updateCurrentCall {
412
+ copy(
413
+ errorCode = null,
414
+ isActive = true,
415
+ isOnHold = false,
416
+ )
417
+ }
418
+
419
+ val call = _currentCall.value
420
+ if (call is Call.Registered) {
421
+ _listener?.onIsCallActive(call.id)
422
+ }
423
+ debugLog(TAG, "[repository] onIsCallActive: Call state updated")
424
+ }
425
+
426
+ /** Check to see if we can make the call inactivate */
427
+ val onIsCallInactive: suspend () -> Unit = {
428
+ debugLog(TAG, "[repository] onIsCallInactive: Call became inactive (on hold)")
429
+ updateCurrentCall { copy(errorCode = null, isOnHold = true) }
430
+
431
+ val call = _currentCall.value
432
+ if (call is Call.Registered) {
433
+ _listener?.onIsCallInactive(call.id)
434
+ }
435
+ debugLog(TAG, "[repository] onIsCallInactive: Call state updated to on hold")
436
+ }
437
+
438
+ }
@@ -0,0 +1,11 @@
1
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
2
+ android:width="24dp"
3
+ android:height="24dp"
4
+ android:autoMirrored="true"
5
+ android:tint="#000000"
6
+ android:viewportWidth="24"
7
+ android:viewportHeight="24">
8
+ <path
9
+ android:fillColor="@android:color/white"
10
+ android:pathData="M16,3c-0.55,0 -1,0.45 -1,1v5c0,0.55 0.45,1 1,1s1,-0.45 1,-1L17,4c0,-0.55 -0.45,-1 -1,-1zM19,4v5c0,0.55 0.45,1 1,1s1,-0.45 1,-1L21,4c0,-0.55 -0.45,-1 -1,-1s-1,0.45 -1,1zM19.23,15.26l-2.54,-0.29c-0.61,-0.07 -1.21,0.14 -1.64,0.57l-1.84,1.84c-2.83,-1.44 -5.15,-3.75 -6.59,-6.59l1.85,-1.85c0.43,-0.43 0.64,-1.03 0.57,-1.64l-0.29,-2.52c-0.12,-1.01 -0.97,-1.77 -1.99,-1.77L5.03,3.01c-1.13,0 -2.07,0.94 -2,2.07 0.53,8.54 7.36,15.36 15.89,15.89 1.13,0.07 2.07,-0.87 2.07,-2v-1.73c0.01,-1.01 -0.75,-1.86 -1.76,-1.98z" />
11
+ </vector>
@@ -0,0 +1,11 @@
1
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
2
+ android:width="24dp"
3
+ android:height="24dp"
4
+ android:autoMirrored="true"
5
+ android:tint="#000000"
6
+ android:viewportWidth="24"
7
+ android:viewportHeight="24">
8
+ <path
9
+ android:fillColor="@android:color/white"
10
+ android:pathData="M19.23,15.26l-2.54,-0.29c-0.61,-0.07 -1.21,0.14 -1.64,0.57l-1.84,1.84c-2.83,-1.44 -5.15,-3.75 -6.59,-6.59l1.85,-1.85c0.43,-0.43 0.64,-1.03 0.57,-1.64l-0.29,-2.52c-0.12,-1.01 -0.97,-1.77 -1.99,-1.77H5.03c-1.13,0 -2.07,0.94 -2,2.07 0.53,8.54 7.36,15.36 15.89,15.89 1.13,0.07 2.07,-0.87 2.07,-2v-1.73c0.01,-1.01 -0.75,-1.86 -1.76,-1.98z" />
11
+ </vector>
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="utf-8"?><!--
2
+ Copyright (c) 2024 Stream.io Inc. All rights reserved.
3
+
4
+ Licensed under the Stream License;
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ https://github.com/GetStream/stream-video-android/blob/main/LICENSE
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ -->
16
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
17
+ android:width="24dp"
18
+ android:height="24dp"
19
+ android:viewportWidth="960"
20
+ android:viewportHeight="960">
21
+ <path
22
+ android:fillColor="#CCC"
23
+ android:pathData="M480,0a480,480 0 1,0 0,960a480,480 0 1,0 0,-960" />
24
+ <path
25
+ android:fillColor="#434343"
26
+ android:pathData="M480,480q-66,0 -113,-47t-47,-113q0,-66 47,-113t113,-47q66,0 113,47t47,113q0,66 -47,113t-113,47ZM160,720v-32q0,-34 17.5,-62.5T224,582q62,-31 126,-46.5T480,520q66,0 130,15.5T736,582q29,15 46.5,43.5T800,688v32q0,33 -23.5,56.5T720,800L240,800q-33,0 -56.5,-23.5T160,720Z" />
27
+ </vector>
@@ -0,0 +1,81 @@
1
+ buildscript {
2
+ ext.getExtOrDefault = {name ->
3
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['Callingx_' + name]
4
+ }
5
+
6
+ repositories {
7
+ google()
8
+ mavenCentral()
9
+ }
10
+
11
+ dependencies {
12
+ classpath "com.android.tools.build:gradle:8.7.2"
13
+ // noinspection DifferentKotlinGradleVersion
14
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
15
+ }
16
+ }
17
+
18
+
19
+ apply plugin: "com.android.library"
20
+ apply plugin: "kotlin-android"
21
+ apply plugin: "kotlin-parcelize"
22
+
23
+ apply plugin: "com.facebook.react"
24
+
25
+ def getExtOrIntegerDefault(name) {
26
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["Callingx_" + name]).toInteger()
27
+ }
28
+
29
+ android {
30
+ namespace "io.getstream.rn.callingx"
31
+
32
+ compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
33
+
34
+ defaultConfig {
35
+ minSdkVersion getExtOrIntegerDefault("minSdkVersion")
36
+ targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
37
+ }
38
+
39
+ buildFeatures {
40
+ buildConfig true
41
+ }
42
+
43
+ buildTypes {
44
+ release {
45
+ minifyEnabled false
46
+ }
47
+ }
48
+
49
+ lint {
50
+ disable "GradleCompatible"
51
+ }
52
+
53
+ compileOptions {
54
+ sourceCompatibility JavaVersion.VERSION_11
55
+ targetCompatibility JavaVersion.VERSION_11
56
+ }
57
+
58
+ sourceSets {
59
+ main {
60
+ java.srcDirs += [
61
+ "generated/java",
62
+ "generated/jni",
63
+ "build/generated/source/codegen/java",
64
+ "build/generated/source/codegen/jni"
65
+ ]
66
+ }
67
+ }
68
+ }
69
+
70
+ repositories {
71
+ mavenCentral()
72
+ google()
73
+ }
74
+
75
+ def kotlin_version = getExtOrDefault("kotlinVersion")
76
+
77
+ dependencies {
78
+ implementation "com.facebook.react:react-android"
79
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
80
+ implementation "androidx.core:core-telecom:1.0.1"
81
+ }
@@ -0,0 +1,5 @@
1
+ Callingx_kotlinVersion=2.0.21
2
+ Callingx_minSdkVersion=24
3
+ Callingx_targetSdkVersion=34
4
+ Callingx_compileSdkVersion=35
5
+ Callingx_ndkVersion=27.1.12297006
@@ -0,0 +1,30 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+
3
+ <uses-permission android:name="android.permission.MANAGE_OWN_CALLS" />
4
+ <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
5
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
6
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
7
+ <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
8
+
9
+ <application>
10
+ <activity
11
+ android:name="io.getstream.rn.callingx.notifications.NotificationReceiverActivity"
12
+ android:excludeFromRecents="true"
13
+ android:exported="false"
14
+ android:noHistory="true"
15
+ android:taskAffinity=""
16
+ android:theme="@android:style/Theme.Translucent.NoTitleBar" />
17
+
18
+ <service
19
+ android:name="io.getstream.rn.callingx.notifications.NotificationReceiverService"
20
+ android:exported="false" />
21
+
22
+ <service
23
+ android:name="io.getstream.rn.callingx.CallService"
24
+ android:enabled="true"
25
+ android:exported="false"
26
+ android:foregroundServiceType="phoneCall"
27
+ android:stopWithTask="true" />
28
+
29
+ </application>
30
+ </manifest>