@tencent-rtc/mcp 1.4.6 → 1.6.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (552) hide show
  1. package/cursor-setting.png +0 -0
  2. package/knowledge/bm25-cache.js +74 -0
  3. package/knowledge/bm25-cache.js.map +1 -0
  4. package/knowledge/bm25.js +148 -0
  5. package/knowledge/bm25.js.map +1 -0
  6. package/knowledge/build-index.js +70 -0
  7. package/knowledge/build-index.js.map +1 -0
  8. package/knowledge/chunker.js +168 -0
  9. package/knowledge/chunker.js.map +1 -0
  10. package/knowledge/content-loader.js +40 -0
  11. package/knowledge/content-loader.js.map +1 -0
  12. package/knowledge/doc-url-resolver.js +143 -0
  13. package/knowledge/doc-url-resolver.js.map +1 -0
  14. package/knowledge/extractors.js +26 -0
  15. package/knowledge/extractors.js.map +1 -0
  16. package/knowledge/path-meta.js +185 -0
  17. package/knowledge/path-meta.js.map +1 -0
  18. package/knowledge/search/exact-lookup.js +498 -0
  19. package/knowledge/search/exact-lookup.js.map +1 -0
  20. package/knowledge/search/filter-pool.js +105 -0
  21. package/knowledge/search/filter-pool.js.map +1 -0
  22. package/knowledge/search/product-scope-intent.js +41 -0
  23. package/knowledge/search/product-scope-intent.js.map +1 -0
  24. package/knowledge/search/requires-framework.js +82 -0
  25. package/knowledge/search/requires-framework.js.map +1 -0
  26. package/knowledge/search/search-knowledge.js +230 -0
  27. package/knowledge/search/search-knowledge.js.map +1 -0
  28. package/mcp-server-prompt.png +0 -0
  29. package/package.json +1 -1
  30. package/resource/_schema/feature-aliases.yaml +10 -0
  31. package/resource/_schema/goal-tags.yaml +72 -0
  32. package/resource/_schema/products.yaml +19 -0
  33. package/resource/_schema/trtc-intents.yaml +27 -0
  34. package/resource/_schema/types.yaml +43 -0
  35. package/resource/index/component-slugs.json +1 -0
  36. package/resource/index/doc-source-urls.json +1 -0
  37. package/resource/index/manifest.json +1 -0
  38. package/resource/{doc → integration}/callkit/preset/android/integration.md +34 -28
  39. package/resource/integration/callkit/preset/flutter/integration.md +346 -0
  40. package/resource/integration/callkit/preset/ios/integration.md +408 -0
  41. package/resource/integration/callkit/preset/react/integration.md +362 -0
  42. package/resource/integration/callkit/preset/vue/integration.md +356 -0
  43. package/resource/integration/chat/preset/android/integration.md +500 -0
  44. package/resource/integration/chat/preset/flutter/integration.md +370 -0
  45. package/resource/integration/chat/preset/ios/integration.md +566 -0
  46. package/resource/integration/chat/preset/react/integration.md +490 -0
  47. package/resource/integration/chat/preset/vue/integration.md +504 -0
  48. package/resource/{doc → integration}/livekit/preset/live/vue/live-list-integration.md +26 -22
  49. package/resource/{doc → integration}/livekit/preset/live/vue/live-player-desk-integration.md +22 -18
  50. package/resource/integration/livekit/preset/live/vue/live-player-h5-integration.md +309 -0
  51. package/resource/{doc → integration}/livekit/preset/live/vue/live-pusher-integration.md +47 -39
  52. package/resource/integration/roomkit/preset/vue/integration.md +562 -0
  53. package/resource/knowledge/callkit/core-sdk/android/answer-call.md +828 -0
  54. package/resource/knowledge/callkit/core-sdk/android/make-call.md +897 -0
  55. package/resource/knowledge/callkit/core-sdk/android/offline-push.md +363 -0
  56. package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +1111 -0
  57. package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +1132 -0
  58. package/resource/{doc → knowledge}/callkit/core-sdk/flutter/offline-push.md +174 -151
  59. package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +1084 -0
  60. package/resource/knowledge/callkit/core-sdk/ios/make-call.md +1252 -0
  61. package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +534 -0
  62. package/resource/knowledge/callkit/core-sdk/uni-app/answer-call.md +953 -0
  63. package/resource/knowledge/callkit/core-sdk/uni-app/make-call.md +1061 -0
  64. package/resource/knowledge/callkit/faq/android.md +92 -0
  65. package/resource/{doc/callkit/faq/android-faq.md → knowledge/callkit/faq/common.md} +11 -12
  66. package/resource/knowledge/callkit/faq/error-code.md +67 -0
  67. package/resource/knowledge/callkit/faq/flutter.md +52 -0
  68. package/resource/knowledge/callkit/faq/ios.md +104 -0
  69. package/resource/knowledge/callkit/faq/web.md +74 -0
  70. package/resource/knowledge/callkit/preset/android/api.md +412 -0
  71. package/resource/knowledge/callkit/preset/flutter/api.md +22 -0
  72. package/resource/knowledge/callkit/preset/ios/api.md +234 -0
  73. package/resource/knowledge/callkit/preset/web/api.md +83 -0
  74. package/resource/knowledge/chat/preset/android/features/chat-setting.md +74 -0
  75. package/resource/knowledge/chat/preset/android/features/contact-list.md +43 -0
  76. package/resource/knowledge/chat/preset/android/features/conversation-list.md +117 -0
  77. package/resource/knowledge/chat/preset/android/features/language.md +136 -0
  78. package/resource/knowledge/chat/preset/android/features/message-input.md +57 -0
  79. package/resource/knowledge/chat/preset/android/features/message-list.md +142 -0
  80. package/resource/knowledge/chat/preset/android/features/search.md +64 -0
  81. package/resource/knowledge/chat/preset/android/features/theme.md +222 -0
  82. package/resource/knowledge/chat/preset/android-view/integration.md +300 -0
  83. package/resource/knowledge/chat/preset/flutter/features/chat-setting.md +64 -0
  84. package/resource/knowledge/chat/preset/flutter/features/contact-list.md +40 -0
  85. package/resource/knowledge/chat/preset/flutter/features/conversation-list.md +129 -0
  86. package/resource/knowledge/chat/preset/flutter/features/language.md +104 -0
  87. package/resource/knowledge/chat/preset/flutter/features/message-input.md +54 -0
  88. package/resource/knowledge/chat/preset/flutter/features/message-list.md +158 -0
  89. package/resource/knowledge/chat/preset/flutter/features/search.md +59 -0
  90. package/resource/knowledge/chat/preset/flutter/features/theme.md +261 -0
  91. package/resource/knowledge/chat/preset/ios/features/chat-setting.md +94 -0
  92. package/resource/knowledge/chat/preset/ios/features/contact-list.md +119 -0
  93. package/resource/knowledge/chat/preset/ios/features/conversation-list.md +134 -0
  94. package/resource/knowledge/chat/preset/ios/features/language.md +125 -0
  95. package/resource/knowledge/chat/preset/ios/features/message-input.md +69 -0
  96. package/resource/knowledge/chat/preset/ios/features/message-list.md +162 -0
  97. package/resource/knowledge/chat/preset/ios/features/search.md +93 -0
  98. package/resource/knowledge/chat/preset/ios/features/theme.md +270 -0
  99. package/resource/{doc/chatkit/ios → knowledge/chat/preset/ios-uikit}/integration.md +160 -158
  100. package/resource/knowledge/chat/preset/react/features/chat-setting.md +101 -0
  101. package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/contact-list.md +43 -41
  102. package/resource/knowledge/chat/preset/react/features/conversation-actions.md +215 -0
  103. package/resource/knowledge/chat/preset/react/features/conversation-list.md +339 -0
  104. package/resource/knowledge/chat/preset/react/features/conversation-preview.md +101 -0
  105. package/resource/knowledge/chat/preset/react/features/conversation-search.md +61 -0
  106. package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/message-input.md +117 -156
  107. package/resource/knowledge/chat/preset/react/features/message-list.md +297 -0
  108. package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/search.md +65 -59
  109. package/resource/knowledge/chat/preset/react/features/theme.md +93 -0
  110. package/resource/knowledge/chat/preset/vue/features/chat-header.md +331 -0
  111. package/resource/knowledge/chat/preset/vue/features/chat-setting.md +79 -0
  112. package/resource/knowledge/chat/preset/vue/features/contact-list.md +277 -0
  113. package/resource/knowledge/chat/preset/vue/features/conversation-actions.md +234 -0
  114. package/resource/knowledge/chat/preset/vue/features/conversation-list.md +331 -0
  115. package/resource/knowledge/chat/preset/vue/features/conversation-preview.md +216 -0
  116. package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/conversation-search.md +13 -13
  117. package/resource/knowledge/chat/preset/vue/features/message-input.md +551 -0
  118. package/resource/knowledge/chat/preset/vue/features/message-list.md +350 -0
  119. package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/search.md +79 -73
  120. package/resource/knowledge/chat/preset/vue/features/theme.md +136 -0
  121. package/resource/knowledge/chat/urls/error-code.md +17 -0
  122. package/resource/knowledge/chat/urls/product.md +43 -0
  123. package/resource/knowledge/chat/urls/restapi.md +204 -0
  124. package/resource/knowledge/chat/urls/sdk/android.md +80 -0
  125. package/resource/knowledge/chat/urls/sdk/flutter.md +71 -0
  126. package/resource/knowledge/chat/urls/sdk/ios.md +80 -0
  127. package/resource/knowledge/chat/urls/sdk/web.md +80 -0
  128. package/resource/knowledge/chat/urls/webhook.md +68 -0
  129. package/resource/knowledge/livekit/core-sdk/api-reference/android/AudioEffectStore.md +286 -0
  130. package/resource/knowledge/livekit/core-sdk/api-reference/android/BarrageStore.md +174 -0
  131. package/resource/knowledge/livekit/core-sdk/api-reference/android/BattleStore.md +329 -0
  132. package/resource/knowledge/livekit/core-sdk/api-reference/android/CameraView.md +55 -0
  133. package/resource/knowledge/livekit/core-sdk/api-reference/android/CoGuestStore.md +434 -0
  134. package/resource/knowledge/livekit/core-sdk/api-reference/android/CoHostStore.md +362 -0
  135. package/resource/knowledge/livekit/core-sdk/api-reference/android/DeviceStore.md +466 -0
  136. package/resource/knowledge/livekit/core-sdk/api-reference/android/GiftStore.md +173 -0
  137. package/resource/knowledge/livekit/core-sdk/api-reference/android/LikeStore.md +51 -0
  138. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveAudienceStore.md +291 -0
  139. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveCoreView.md +78 -0
  140. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveSeatStore.md +488 -0
  141. package/resource/knowledge/livekit/core-sdk/api-reference/android/LoginStore.md +219 -0
  142. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/AudioEffectStore.md +282 -0
  143. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BarrageStore.md +212 -0
  144. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BaseBeautyStore.md +153 -0
  145. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BattleStore.md +312 -0
  146. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoGuestStore.md +404 -0
  147. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoHostStore.md +334 -0
  148. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/DeviceStore.md +426 -0
  149. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/GiftStore.md +166 -0
  150. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LikeStore.md +52 -0
  151. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveAudienceStore.md +281 -0
  152. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveCoreView.md +150 -0
  153. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveSeatStore.md +438 -0
  154. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LoginStore.md +190 -0
  155. package/resource/knowledge/livekit/core-sdk/api-reference/ios/AudioEffectStore.md +291 -0
  156. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BarrageStore.md +192 -0
  157. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BaseBeautyStore.md +146 -0
  158. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BattleStore.md +309 -0
  159. package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoGuestStore.md +370 -0
  160. package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoHostStore.md +339 -0
  161. package/resource/knowledge/livekit/core-sdk/api-reference/ios/DeviceStore.md +503 -0
  162. package/resource/knowledge/livekit/core-sdk/api-reference/ios/GiftStore.md +188 -0
  163. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LikeStore.md +51 -0
  164. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveAudienceStore.md +289 -0
  165. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveCoreView.md +78 -0
  166. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveSeatStore.md +487 -0
  167. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LoginStore.md +183 -0
  168. package/resource/knowledge/livekit/core-sdk/api-reference/web/index.md +736 -0
  169. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audience-list.md +53 -47
  170. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audio-effect.md +28 -24
  171. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-barrage.md +22 -18
  172. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-base-beauty.md +17 -15
  173. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-co-guest-interaction.md +19 -18
  174. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-gift.md +102 -89
  175. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-host-interaction.md +41 -37
  176. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-integration.md +45 -43
  177. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-live-list.md +23 -20
  178. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audience-list.md +41 -41
  179. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audio-effect.md +70 -69
  180. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-barrage.md +68 -71
  181. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-base-beauty.md +43 -47
  182. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-co-guest-interaction.md +59 -56
  183. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-gift.md +103 -105
  184. package/resource/knowledge/livekit/core-sdk/live/flutter/live-host-interaction.md +869 -0
  185. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-integration.md +84 -87
  186. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-live-list.md +43 -40
  187. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audience-list.md +11 -10
  188. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audio-effect.md +28 -24
  189. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-barrage.md +22 -18
  190. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-base-beauty.md +15 -14
  191. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-co-guest-interaction.md +19 -18
  192. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-gift.md +54 -50
  193. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-host-interaction.md +41 -37
  194. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-integration.md +40 -40
  195. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-live-list.md +19 -18
  196. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audience-list.md +53 -47
  197. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audio-effect.md +28 -24
  198. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-barrage.md +22 -18
  199. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-co-guest-interaction.md +41 -33
  200. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-gift.md +94 -81
  201. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-host-interaction.md +35 -30
  202. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-integration.md +45 -42
  203. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-room-list.md +23 -20
  204. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audience-list.md +260 -0
  205. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audio-effect.md +598 -0
  206. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-barrage.md +490 -0
  207. package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-co-guest-interaction.md +65 -59
  208. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-gift.md +424 -0
  209. package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-integration.md +69 -76
  210. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-room-list.md +726 -0
  211. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audience-list.md +11 -10
  212. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audio-effect.md +28 -24
  213. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-barrage.md +22 -18
  214. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-co-guest-interaction.md +41 -33
  215. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-gift.md +54 -50
  216. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-host-interaction.md +35 -30
  217. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-integration.md +49 -46
  218. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-room-list.md +19 -18
  219. package/resource/knowledge/livekit/faq/error-code.md +193 -0
  220. package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/barrage.md +56 -53
  221. package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-audience-list.md +22 -21
  222. package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-view.md +34 -32
  223. package/resource/knowledge/push/config/android.md +92 -0
  224. package/resource/knowledge/push/config/harmonyos.md +83 -0
  225. package/resource/knowledge/push/config/ios.md +254 -0
  226. package/resource/knowledge/push/config/react-native.md +254 -0
  227. package/resource/knowledge/push/config/unity.md +209 -0
  228. package/resource/knowledge/push/config/unreal-engine.md +194 -0
  229. package/resource/knowledge/push/integration/android.md +404 -0
  230. package/resource/knowledge/push/integration/flutter.md +465 -0
  231. package/resource/knowledge/push/integration/harmonyos.md +63 -0
  232. package/resource/knowledge/push/integration/ios.md +246 -0
  233. package/resource/knowledge/push/integration/react-native.md +366 -0
  234. package/resource/knowledge/push/integration/uni-app.md +208 -0
  235. package/resource/knowledge/push/integration/unity.md +389 -0
  236. package/resource/knowledge/push/integration/unreal-engine.md +390 -0
  237. package/resource/knowledge/push/overview/prepare.md +60 -0
  238. package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +241 -0
  239. package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +588 -0
  240. package/resource/knowledge/roomkit/core-sdk/android/room-state.md +364 -0
  241. package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +340 -0
  242. package/resource/knowledge/roomkit/core-sdk/flutter/call-user-to-room.md +230 -0
  243. package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +797 -0
  244. package/resource/knowledge/roomkit/core-sdk/flutter/room-state.md +325 -0
  245. package/resource/knowledge/roomkit/core-sdk/flutter/schedule-room.md +325 -0
  246. package/resource/knowledge/roomkit/core-sdk/ios/call-user-to-room.md +233 -0
  247. package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +569 -0
  248. package/resource/knowledge/roomkit/core-sdk/ios/room-state.md +325 -0
  249. package/resource/knowledge/roomkit/core-sdk/ios/schedule-room.md +322 -0
  250. package/resource/knowledge/roomkit/core-sdk/vue/call-user-to-room.md +221 -0
  251. package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/device-detection.md +49 -48
  252. package/resource/knowledge/roomkit/core-sdk/vue/device-state.md +461 -0
  253. package/resource/knowledge/roomkit/core-sdk/vue/free-beauty-panel.md +216 -0
  254. package/resource/knowledge/roomkit/core-sdk/vue/room-chat.md +370 -0
  255. package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-participant-state.md +61 -60
  256. package/resource/knowledge/roomkit/core-sdk/vue/room-state.md +280 -0
  257. package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-view.md +57 -56
  258. package/resource/knowledge/roomkit/core-sdk/vue/schedule-room.md +319 -0
  259. package/resource/knowledge/roomkit/core-sdk/vue/screen-share.md +267 -0
  260. package/resource/knowledge/roomkit/core-sdk/vue/virtual-background.md +261 -0
  261. package/resource/knowledge/roomkit/preset/android/integration.md +396 -0
  262. package/resource/knowledge/roomkit/preset/flutter/integration.md +404 -0
  263. package/resource/knowledge/roomkit/preset/ios/integration.md +369 -0
  264. package/resource/knowledge/roomkit/preset/react/integration.md +576 -0
  265. package/resource/knowledge/rtcengine/web/how_to_run_web_sdk_demo.md +44 -0
  266. package/resource/{doc → knowledge}/rtcengine/web/plugin/21-advanced-auto-play-policy.md +8 -2
  267. package/resource/{doc → knowledge}/rtcengine/web/plugin/22-advanced-audio-mixer.md +19 -1
  268. package/resource/{doc → knowledge}/rtcengine/web/plugin/23-advanced-support-detection.md +1 -1
  269. package/resource/{doc → knowledge}/rtcengine/web/plugin/24-advanced-network-quality.md +8 -8
  270. package/resource/{doc → knowledge}/rtcengine/web/plugin/25-advanced-device-change.md +1 -1
  271. package/resource/{doc → knowledge}/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +6 -6
  272. package/resource/{doc → knowledge}/rtcengine/web/plugin/27-advanced-small-stream.md +3 -3
  273. package/resource/{doc → knowledge}/rtcengine/web/plugin/29-advanced-water-mark.md +18 -0
  274. package/resource/{doc → knowledge}/rtcengine/web/plugin/31-advanced-plugins-overview.md +1 -1
  275. package/resource/{doc → knowledge}/rtcengine/web/plugin/34-advanced-proxy.md +2 -2
  276. package/resource/{doc → knowledge}/rtcengine/web/plugin/35-advanced-ai-denoiser.md +1 -1
  277. package/resource/knowledge/trtc/android/TRTCCloud.md +1915 -0
  278. package/resource/knowledge/trtc/android/TRTCCloudDef.md +1029 -0
  279. package/resource/knowledge/trtc/android/TRTCCloudListener.md +1095 -0
  280. package/resource/knowledge/trtc/android/TRTCStatistics.md +68 -0
  281. package/resource/knowledge/trtc/android/TXAudioEffectManager.md +502 -0
  282. package/resource/knowledge/trtc/android/TXBeautyManager.md +415 -0
  283. package/resource/knowledge/trtc/android/TXDeviceManager.md +169 -0
  284. package/resource/knowledge/trtc/android/TXLiteAVCode.md +125 -0
  285. package/resource/knowledge/trtc/c++/ITRTCCloud.md +2069 -0
  286. package/resource/knowledge/trtc/c++/ITRTCStatistics.md +73 -0
  287. package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +502 -0
  288. package/resource/knowledge/trtc/c++/ITXDeviceManager.md +391 -0
  289. package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +1191 -0
  290. package/resource/knowledge/trtc/c++/TRTCTypeDef.md +931 -0
  291. package/resource/knowledge/trtc/c++/TXLiteAVCode.md +127 -0
  292. package/resource/knowledge/trtc/ios/TRTCCloud.md +2118 -0
  293. package/resource/knowledge/trtc/ios/TRTCCloudDef.md +975 -0
  294. package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +1131 -0
  295. package/resource/knowledge/trtc/ios/TRTCStatistics.md +68 -0
  296. package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +423 -0
  297. package/resource/knowledge/trtc/ios/TXBeautyManager.md +416 -0
  298. package/resource/knowledge/trtc/ios/TXDeviceManager.md +387 -0
  299. package/resource/knowledge/trtc/ios/TXLiteAVCode.md +127 -0
  300. package/server.js +35 -10
  301. package/server.js.map +1 -1
  302. package/tools/call/get_native_call_uikit_integration.js +2 -3
  303. package/tools/call/get_native_call_uikit_integration.js.map +1 -1
  304. package/tools/call/get_native_callkit_core_integration.js +2 -5
  305. package/tools/call/get_native_callkit_core_integration.js.map +1 -1
  306. package/tools/call/get_web_call_uikit_integration.js +2 -3
  307. package/tools/call/get_web_call_uikit_integration.js.map +1 -1
  308. package/tools/chat/get_native_chat_uikit_integration.js +2 -3
  309. package/tools/chat/get_native_chat_uikit_integration.js.map +1 -1
  310. package/tools/chat/get_web_chat_uikit_integration.js +2 -3
  311. package/tools/chat/get_web_chat_uikit_integration.js.map +1 -1
  312. package/tools/common/present_framework_choice.js +19 -13
  313. package/tools/common/present_framework_choice.js.map +1 -1
  314. package/tools/common/record_answer.js +19 -25
  315. package/tools/common/record_answer.js.map +1 -1
  316. package/tools/common/record_feedback.js +17 -30
  317. package/tools/common/record_feedback.js.map +1 -1
  318. package/tools/common/search_trtc_knowledge.js +45 -0
  319. package/tools/common/search_trtc_knowledge.js.map +1 -0
  320. package/tools/definitions/get_native_call_uikit_integration_def.js +3 -1
  321. package/tools/definitions/get_native_call_uikit_integration_def.js.map +1 -1
  322. package/tools/definitions/get_native_callkit_core_integration_def.js +5 -3
  323. package/tools/definitions/get_native_callkit_core_integration_def.js.map +1 -1
  324. package/tools/definitions/get_native_chat_uikit_integration_def.js +5 -2
  325. package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
  326. package/tools/definitions/get_native_livekit_core_integration_def.js +6 -5
  327. package/tools/definitions/get_native_livekit_core_integration_def.js.map +1 -1
  328. package/tools/definitions/get_web_call_uikit_integration_def.js +4 -2
  329. package/tools/definitions/get_web_call_uikit_integration_def.js.map +1 -1
  330. package/tools/definitions/get_web_chat_uikit_integration_def.js +2 -0
  331. package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
  332. package/tools/definitions/get_web_live_uikit_integration_def.js +5 -5
  333. package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -1
  334. package/tools/definitions/get_web_room_core_integration_def.js +50 -0
  335. package/tools/definitions/get_web_room_core_integration_def.js.map +1 -0
  336. package/tools/definitions/get_web_room_uikit_integration_def.js +5 -4
  337. package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -1
  338. package/tools/definitions/integration-boundary.js +6 -0
  339. package/tools/definitions/integration-boundary.js.map +1 -0
  340. package/tools/definitions/present_framework_choice_def.js +12 -10
  341. package/tools/definitions/present_framework_choice_def.js.map +1 -1
  342. package/tools/definitions/record_answer_def.js +19 -17
  343. package/tools/definitions/record_answer_def.js.map +1 -1
  344. package/tools/definitions/record_feedback_def.js +14 -13
  345. package/tools/definitions/record_feedback_def.js.map +1 -1
  346. package/tools/definitions/search_trtc_knowledge_def.js +40 -0
  347. package/tools/definitions/search_trtc_knowledge_def.js.map +1 -0
  348. package/tools/index.js +5 -36
  349. package/tools/index.js.map +1 -1
  350. package/tools/live/get_native_livekit_core_integration.js +1 -3
  351. package/tools/live/get_native_livekit_core_integration.js.map +1 -1
  352. package/tools/live/get_web_live_uikit_integration.js +2 -4
  353. package/tools/live/get_web_live_uikit_integration.js.map +1 -1
  354. package/tools/room/get_web_room_core_integration.js +48 -0
  355. package/tools/room/get_web_room_core_integration.js.map +1 -0
  356. package/tools/room/get_web_room_uikit_integration.js +2 -3
  357. package/tools/room/get_web_room_uikit_integration.js.map +1 -1
  358. package/utils/generate-structured-result.js +24 -30
  359. package/utils/generate-structured-result.js.map +1 -1
  360. package/utils/get-doc-content.js +14 -8
  361. package/utils/get-doc-content.js.map +1 -1
  362. package/utils/report-cls-client.js +18 -20
  363. package/utils/report-cls-client.js.map +1 -1
  364. package/utils/report-es-client.js +1 -1
  365. package/resource/doc/callkit/core-sdk/.gitkeep +0 -0
  366. package/resource/doc/callkit/core-sdk/android/answer-call.md +0 -852
  367. package/resource/doc/callkit/core-sdk/android/make-call.md +0 -954
  368. package/resource/doc/callkit/core-sdk/android/offline-push.md +0 -361
  369. package/resource/doc/callkit/core-sdk/flutter/answer-call.md +0 -1160
  370. package/resource/doc/callkit/core-sdk/flutter/make-call.md +0 -1205
  371. package/resource/doc/callkit/core-sdk/ios/answer-call.md +0 -1090
  372. package/resource/doc/callkit/core-sdk/ios/make-call.md +0 -1248
  373. package/resource/doc/callkit/core-sdk/ios/offline-push.md +0 -485
  374. package/resource/doc/callkit/core-sdk/uni-app/answer-call.md +0 -950
  375. package/resource/doc/callkit/core-sdk/uni-app/make-call.md +0 -1052
  376. package/resource/doc/callkit/faq/common/error-code.md +0 -47
  377. package/resource/doc/callkit/faq/flutter-faq.md +0 -115
  378. package/resource/doc/callkit/faq/ios-faq.md +0 -115
  379. package/resource/doc/callkit/faq/web-faq.md +0 -36
  380. package/resource/doc/callkit/preset/android/api.md +0 -296
  381. package/resource/doc/callkit/preset/flutter/api.md +0 -410
  382. package/resource/doc/callkit/preset/flutter/integration.md +0 -164
  383. package/resource/doc/callkit/preset/ios/api.md +0 -80
  384. package/resource/doc/callkit/preset/ios/integration.md +0 -187
  385. package/resource/doc/callkit/preset/react/api.md +0 -501
  386. package/resource/doc/callkit/preset/react/integration.md +0 -86
  387. package/resource/doc/callkit/preset/vue/api.md +0 -501
  388. package/resource/doc/callkit/preset/vue/integration.md +0 -83
  389. package/resource/doc/chatkit/android/faq.md +0 -111
  390. package/resource/doc/chatkit/android/features/theme.md +0 -219
  391. package/resource/doc/chatkit/android/integration.md +0 -490
  392. package/resource/doc/chatkit/faq/android_sdk/client-api.md +0 -281
  393. package/resource/doc/chatkit/faq/common/product.md +0 -7
  394. package/resource/doc/chatkit/faq/common/server.md +0 -44
  395. package/resource/doc/chatkit/faq/common/server_error_code.md +0 -74
  396. package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +0 -199
  397. package/resource/doc/chatkit/faq/flutter_sdk/faq.md +0 -53
  398. package/resource/doc/chatkit/faq/ios_sdk/client-api.md +0 -235
  399. package/resource/doc/chatkit/faq/web_sdk/error_code.md +0 -47
  400. package/resource/doc/chatkit/faq/web_sdk/faq.md +0 -287
  401. package/resource/doc/chatkit/flutter/faq.md +0 -23
  402. package/resource/doc/chatkit/flutter/features/theme.md +0 -235
  403. package/resource/doc/chatkit/flutter/integration.md +0 -344
  404. package/resource/doc/chatkit/ios/faq.md +0 -111
  405. package/resource/doc/chatkit/ios/features/theme.md +0 -267
  406. package/resource/doc/chatkit/react/components/avatar.md +0 -104
  407. package/resource/doc/chatkit/react/components/chat-header.md +0 -148
  408. package/resource/doc/chatkit/react/components/chat-setting.md +0 -57
  409. package/resource/doc/chatkit/react/components/chat.md +0 -38
  410. package/resource/doc/chatkit/react/components/component-list.md +0 -37
  411. package/resource/doc/chatkit/react/components/conversation-actions.md +0 -174
  412. package/resource/doc/chatkit/react/components/conversation-list.md +0 -333
  413. package/resource/doc/chatkit/react/components/conversation-preview.md +0 -118
  414. package/resource/doc/chatkit/react/components/conversation-search.md +0 -60
  415. package/resource/doc/chatkit/react/components/message-list.md +0 -293
  416. package/resource/doc/chatkit/react/components/tuikit.md +0 -34
  417. package/resource/doc/chatkit/react/faq.md +0 -26
  418. package/resource/doc/chatkit/react/integration.md +0 -416
  419. package/resource/doc/chatkit/vue/components/avatar.md +0 -104
  420. package/resource/doc/chatkit/vue/components/chat-header.md +0 -148
  421. package/resource/doc/chatkit/vue/components/chat-setting.md +0 -62
  422. package/resource/doc/chatkit/vue/components/chat.md +0 -45
  423. package/resource/doc/chatkit/vue/components/component-list.md +0 -87
  424. package/resource/doc/chatkit/vue/components/contact-list.md +0 -271
  425. package/resource/doc/chatkit/vue/components/conversation-actions.md +0 -228
  426. package/resource/doc/chatkit/vue/components/conversation-list.md +0 -320
  427. package/resource/doc/chatkit/vue/components/conversation-preview.md +0 -213
  428. package/resource/doc/chatkit/vue/components/message-input.md +0 -1054
  429. package/resource/doc/chatkit/vue/components/message-list.md +0 -433
  430. package/resource/doc/chatkit/vue/components/tuikit.md +0 -31
  431. package/resource/doc/chatkit/vue/components/userpicker.md +0 -256
  432. package/resource/doc/chatkit/vue/faq.md +0 -36
  433. package/resource/doc/chatkit/vue/integration.md +0 -428
  434. package/resource/doc/livekit/core-sdk/live/flutter/live-host-interaction.md +0 -866
  435. package/resource/doc/livekit/faq/common/error-code.md +0 -88
  436. package/resource/doc/livekit/preset/live/vue/api-reference/index.md +0 -780
  437. package/resource/doc/livekit/preset/live/vue/components/co-guest-panel.md +0 -91
  438. package/resource/doc/livekit/preset/live/vue/components/live-scene-panel.md +0 -112
  439. package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +0 -215
  440. package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +0 -300
  441. package/resource/doc/roomkit/faq/common/error-code.md +0 -67
  442. package/resource/doc/roomkit/vue/features/call-user-to-room.md +0 -220
  443. package/resource/doc/roomkit/vue/features/device-state.md +0 -460
  444. package/resource/doc/roomkit/vue/features/free-beauty-panel.md +0 -215
  445. package/resource/doc/roomkit/vue/features/room-chat.md +0 -369
  446. package/resource/doc/roomkit/vue/features/room-state.md +0 -282
  447. package/resource/doc/roomkit/vue/features/schedule-room.md +0 -318
  448. package/resource/doc/roomkit/vue/features/screen-share.md +0 -265
  449. package/resource/doc/roomkit/vue/features/virtual-background.md +0 -271
  450. package/resource/doc/roomkit/vue/integration.md +0 -315
  451. package/resource/doc/rtcengine/faq/common/error_code.md +0 -1
  452. package/resource/doc/rtcengine/faq/web_sdk/.gitkeep +0 -0
  453. package/resource/doc/rtcengine/web/.gitkeep +0 -0
  454. package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +0 -59
  455. package/resource/doc/trtc/C++/ITRTCCloud.md +0 -1970
  456. package/resource/doc/trtc/C++/ITRTCStatistics.md +0 -70
  457. package/resource/doc/trtc/C++/ITXAudioEffectManager.md +0 -469
  458. package/resource/doc/trtc/C++/ITXDeviceManager.md +0 -387
  459. package/resource/doc/trtc/C++/TRTCCloudCallback.md +0 -1082
  460. package/resource/doc/trtc/C++/TRTCTypeDef.md +0 -925
  461. package/resource/doc/trtc/C++/TXLiteAVCode.md +0 -129
  462. package/resource/doc/trtc/android/TRTCCloud.md +0 -1815
  463. package/resource/doc/trtc/android/TRTCCloudDef.md +0 -992
  464. package/resource/doc/trtc/android/TRTCCloudListener.md +0 -1004
  465. package/resource/doc/trtc/android/TRTCStatistics.md +0 -65
  466. package/resource/doc/trtc/android/TXAudioEffectManager.md +0 -469
  467. package/resource/doc/trtc/android/TXBeautyManager.md +0 -402
  468. package/resource/doc/trtc/android/TXDeviceManager.md +0 -173
  469. package/resource/doc/trtc/android/TXLiteAVCode.md +0 -127
  470. package/resource/doc/trtc/iOS/TRTCCloud.md +0 -2028
  471. package/resource/doc/trtc/iOS/TRTCCloudDef.md +0 -958
  472. package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +0 -1046
  473. package/resource/doc/trtc/iOS/TRTCStatistics.md +0 -65
  474. package/resource/doc/trtc/iOS/TXAudioEffectManager.md +0 -397
  475. package/resource/doc/trtc/iOS/TXBeautyManager.md +0 -403
  476. package/resource/doc/trtc/iOS/TXDeviceManager.md +0 -381
  477. package/resource/doc/trtc/iOS/TXLiteAVCode.md +0 -130
  478. package/tools/call/get_callkit_api.js +0 -33
  479. package/tools/call/get_callkit_api.js.map +0 -1
  480. package/tools/chat/get_native_chat_uikit_feature_detail.js +0 -35
  481. package/tools/chat/get_native_chat_uikit_feature_detail.js.map +0 -1
  482. package/tools/chat/get_web_chat_uikit_component_detail.js +0 -35
  483. package/tools/chat/get_web_chat_uikit_component_detail.js.map +0 -1
  484. package/tools/common/get_faq.js +0 -266
  485. package/tools/common/get_faq.js.map +0 -1
  486. package/tools/common/record_skill_session.js +0 -69
  487. package/tools/common/record_skill_session.js.map +0 -1
  488. package/tools/definitions/get_callkit_api_def.js +0 -29
  489. package/tools/definitions/get_callkit_api_def.js.map +0 -1
  490. package/tools/definitions/get_faq_def.js +0 -49
  491. package/tools/definitions/get_faq_def.js.map +0 -1
  492. package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +0 -31
  493. package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +0 -1
  494. package/tools/definitions/get_native_livekit_core_features_def.js +0 -34
  495. package/tools/definitions/get_native_livekit_core_features_def.js.map +0 -1
  496. package/tools/definitions/get_native_trtc_sdk_docs_def.js +0 -32
  497. package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +0 -1
  498. package/tools/definitions/get_web_chat_uikit_component_detail_def.js +0 -31
  499. package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +0 -1
  500. package/tools/definitions/get_web_livekit_api_def.js +0 -30
  501. package/tools/definitions/get_web_livekit_api_def.js.map +0 -1
  502. package/tools/definitions/get_web_livekit_component_detail_def.js +0 -32
  503. package/tools/definitions/get_web_livekit_component_detail_def.js.map +0 -1
  504. package/tools/definitions/get_web_roomkit_feature_detail_def.js +0 -31
  505. package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +0 -1
  506. package/tools/definitions/get_web_trtc_sdk_api_def.js +0 -27
  507. package/tools/definitions/get_web_trtc_sdk_api_def.js.map +0 -1
  508. package/tools/definitions/get_web_trtc_sdk_integration_def.js +0 -27
  509. package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +0 -1
  510. package/tools/definitions/get_web_trtc_sdk_plugin_def.js +0 -27
  511. package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +0 -1
  512. package/tools/definitions/record_skill_session_def.js +0 -31
  513. package/tools/definitions/record_skill_session_def.js.map +0 -1
  514. package/tools/live/get_native_livekit_core_features.js +0 -68
  515. package/tools/live/get_native_livekit_core_features.js.map +0 -1
  516. package/tools/live/get_web_livekit_api.js +0 -33
  517. package/tools/live/get_web_livekit_api.js.map +0 -1
  518. package/tools/live/get_web_livekit_component_detail.js +0 -35
  519. package/tools/live/get_web_livekit_component_detail.js.map +0 -1
  520. package/tools/room/get_web_roomkit_feature_detail.js +0 -69
  521. package/tools/room/get_web_roomkit_feature_detail.js.map +0 -1
  522. package/tools/rtcengine/get_web_trtc_sdk_api.js +0 -32
  523. package/tools/rtcengine/get_web_trtc_sdk_api.js.map +0 -1
  524. package/tools/rtcengine/get_web_trtc_sdk_integration.js +0 -32
  525. package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +0 -1
  526. package/tools/rtcengine/get_web_trtc_sdk_plugin.js +0 -32
  527. package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +0 -1
  528. package/tools/trtc/get_native_trtc_sdk_docs.js +0 -74
  529. package/tools/trtc/get_native_trtc_sdk_docs.js.map +0 -1
  530. package/utils/build-session-directives.js +0 -120
  531. package/utils/build-session-directives.js.map +0 -1
  532. package/utils/handle-framework.js +0 -9
  533. package/utils/handle-framework.js.map +0 -1
  534. package/utils/handle-state-name.js +0 -29
  535. package/utils/handle-state-name.js.map +0 -1
  536. package/utils/report-runtime-error-cls-client.js +0 -91
  537. package/utils/report-runtime-error-cls-client.js.map +0 -1
  538. /package/resource/{doc/livekit/preset/live/vue/faq.md → knowledge/push/config/donut.md} +0 -0
  539. /package/resource/{doc/roomkit/vue/faq.md → knowledge/push/integration/donut.md} +0 -0
  540. /package/resource/{doc → knowledge}/rtcengine/web/api.md +0 -0
  541. /package/resource/{doc/rtcengine/faq/web/web.md → knowledge/rtcengine/web/faq.md} +0 -0
  542. /package/resource/{doc → knowledge}/rtcengine/web/how_to_integrated_web_sdk.md +0 -0
  543. /package/resource/{doc → knowledge}/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +0 -0
  544. /package/resource/{doc → knowledge}/rtcengine/web/plugin/28-advanced-beauty.md +0 -0
  545. /package/resource/{doc → knowledge}/rtcengine/web/plugin/30-advanced-cross-room-link.md +0 -0
  546. /package/resource/{doc → knowledge}/rtcengine/web/plugin/36-advanced-virtual-background.md +0 -0
  547. /package/resource/{doc → knowledge}/rtcengine/web/plugin/37-advanced-voice-changer.md +0 -0
  548. /package/resource/{doc → knowledge}/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -0
  549. /package/resource/{doc → knowledge}/rtcengine/web/plugin/40-advanced-video-mixer.md +0 -0
  550. /package/resource/{doc → knowledge}/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +0 -0
  551. /package/resource/{doc → knowledge}/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +0 -0
  552. /package/resource/{doc → knowledge}/rtcengine/web/plugin/43-advanced-face-detection.md +0 -0
@@ -0,0 +1,897 @@
1
+ This guide walks you through implementing the "Make a Call" feature with the **AtomicXCore SDK**. You'll use three core building blocks—**DeviceStore**, **CallStore**, and the main UI component **CallCoreView**—to build a complete calling experience.
2
+
3
+ ## Core Features
4
+
5
+ **AtomicXCore** offers three essential modules for building multi-party Audio/Video Call scenarios:
6
+
7
+ |**Module**|**Feature Description**|
8
+ |---------|---------|
9
+ |[CallCoreView](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.view/-call-core-view/index.html)|The main call UI component. It observes CallStore data and handles video rendering automatically, and supports customization of layout, avatars, and icons.|
10
+ |[CallStore](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-store/index.html)|Manages the call lifecycle (place a call, answer, reject, hang up) and exposes real-time participant audio/video status, call duration, call logs, and more.|
11
+ |[DeviceStore](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.device/-device-store/index.html)|Controls audio/video devices: microphone (toggle/volume), camera (toggle/switch/quality), screen sharing, and real-time device status monitoring.|
12
+
13
+ ## Preparation
14
+
15
+ ### Step 1: Activate the Service
16
+
17
+ Follow the instructions in Activate the service to obtain either a trial or paid edition of the SDK.
18
+
19
+ ### Step 2: Integrate the SDK
20
+
21
+ **Add dependencies:** Include `api "io.trtc.uikit:atomicx-core:latest.release"` and `api "com.tencent.imsdk:imsdk-plus:8.7.7201"` in your **build.gradle** file, then run **Gradle Sync**.
22
+ ``` java
23
+ dependencies {
24
+ api "io.trtc.uikit:atomicx-core:latest.release"
25
+ api "com.tencent.imsdk:imsdk-plus:8.7.7201"
26
+ // Other dependencies...
27
+ }
28
+ ```
29
+
30
+ ### Step 3: Initialize and Log In
31
+
32
+ To enable calling features, first initialize CallStore, then log in the user. CallStore syncs user info by listening for login success and then enters the ready state. See the flowchart and sample code below:
33
+
34
+ ``` java
35
+ class MainActivity : ComponentActivity() {
36
+ override fun onCreate(savedInstanceState: Bundle?) {
37
+ super.onCreate(savedInstanceState)
38
+ // Initialize CallStore
39
+ CallStore.shared
40
+ val sdkAppId = 1400000001 // Replace with your SDKAppID
41
+ val userId = "test_001" // Replace with your UserID
42
+ val userSig = "xxxxxxxxxxx" // Replace with your UserSig
43
+ LoginStore.shared.login(
44
+ this,
45
+ sdkAppId,
46
+ userId,
47
+ userSig,
48
+ object : CompletionHandler {
49
+ override fun onSuccess() {
50
+ // Initialize TUICallEngine
51
+ TUICallEngine.createInstance(this@MainActivity).init(sdkAppId, userId, userSig, null)
52
+ // Login successful
53
+ Log.d("Login", "login success");
54
+ }
55
+ override fun onFailure(code: Int, desc: String) {
56
+ // Login failed
57
+ Log.e("Login", "login failed, code: $code, error: $desc");
58
+ }
59
+ }
60
+ )
61
+ }
62
+ }
63
+ ```
64
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Description</strong> |
65
+ | --- | --- | --- |
66
+ | userId | String | Unique identifier for the current user. Only letters, numbers, hyphens, and underscores are allowed. Avoid simple IDs like 1 or 123 to prevent multi-device login conflicts. |
67
+ | sdkAppId | int | Obtain from the <a href="https://trtc.io/login?fro=gt&s_url=https%3A%2F%2Fconsole.trtc.io%2F">console</a>; typically a 10-digit integer starting with 140 or 160. |
68
+ | userSig | String | Authentication token for TRTC.<br>- Development: Use the local <a href="https://github.com/Tencent-RTC/TUIKit_Android/blob/main/call/tuicallkit-kt/src/main/java/com/tencent/qcloud/tuikit/tuicallkit/debug/GenerateTestUserSig.kt">GenerateTestUserSig.genTestUserSig</a> function or the <a href="https://console.trtc.io/usersig">UserSig Tool</a> to generate a temporary UserSig.<br>- Production: Always generate UserSig server-side to prevent SecretKey leakage. See Server-side UserSig Generation. For more details, see How to calculate and use UserSig. |
69
+
70
+ ## Implementation
71
+
72
+ > **Note:**
73
+ >
74
+
75
+ > You must log in before making a call. The following steps show how to make a call.
76
+ >
77
+
78
+ ### Step 1: Create Call Interface
79
+
80
+ Set up a dedicated call screen that appears when a call is initiated:
81
+ 1. **Create the call screen:** Implement a new Activity to host the call UI and handle navigation when a call is received.
82
+
83
+ 2. **Attach **[CallCoreView](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.view/-call-core-view/index.html)**:** This core view component observes **CallStore** data and renders the call UI. It supports layout switching, avatar, and icon customization.
84
+
85
+ ``` java
86
+ class CallActivity : AppCompatActivity() {
87
+ private var callCoreView: CallCoreView? = null
88
+ // 1. Create call page container
89
+ override fun onCreate(savedInstanceState: Bundle?) {
90
+ super.onCreate(savedInstanceState)
91
+ // 2. Attach CallCoreView to the call screen
92
+ callCoreView = CallCoreView(this)
93
+ setContentView(callCoreView)
94
+ }
95
+ }
96
+ ```
97
+
98
+ **CallCoreView Component Features:**
99
+
100
+ |**Feature**|**Description**|**Reference**|
101
+ |---------|---------|---------|
102
+ |**Set Layout Mode**|Switch between different layout modes. If not specified, layout adapts automatically based on participant count.|Switch Layout Mode|
103
+ |**Set Avatar**|Customize avatars for specific users via resource path.|Customize Default Avatar|
104
+ |**Set Volume Indicator Icon**|Personalize volume indicator icons for different volume levels.|Customize Volume Indicator Icon|
105
+ |**Set Network Indicator Icon**|Show network quality status with real-time indicator icons.|Customize Network Indicator Icon|
106
+ |**Set Waiting Animation for Users**|Display GIF animations for users in the waiting state during multi-party calls.|Customize Loading Animation|
107
+
108
+ ### Step 2: Add Call Controls
109
+
110
+ Use the APIs from [DeviceStore](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.device/-device-store/index.html) and [CallStore](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-store/index.html) to add and customize call control buttons:
111
+ - **DeviceStore:** Microphone (toggle and volume), camera (toggle, switch, quality), and screen sharing. Wire these APIs to your buttons and observe device state to update the UI in real time.
112
+
113
+ - **CallStore:** Call actions (answer, hang up, reject). Wire these to button clicks and show/hide or enable/disable buttons based on call status.
114
+
115
+ - **Icons:** You can download button icons from [GitHub](https://github.com/Tencent-RTC/TUIKit_Android/tree/main/call/tuicallkit-kt/src/main/res). They are designed for TUICallKit and free for use.
116
+
117
+ |**Icons**|||||||||
118
+ |---------|---------|---------|---------|---------|---------|---------|---------|---------|
119
+
120
+ - **Example: Adding****hang up, microphone, and camera buttons**
121
+
122
+ 1. **Create Bottom Bar Container:** Add a container at the bottom of the call screen to hold the hang up, microphone, and camera buttons.
123
+
124
+ ``` java
125
+ import io.trtc.tuikit.atomicxcore.api.call.CallStore
126
+ import io.trtc.tuikit.atomicxcore.api.view.CallCoreView
127
+ import io.trtc.tuikit.atomicxcore.api.device.DeviceStore
128
+
129
+ class CallActivity : AppCompatActivity() {
130
+ private var buttonContainer: Button? = null
131
+
132
+ override fun onCreate(savedInstanceState: Bundle?) {
133
+ super.onCreate(savedInstanceState)
134
+ // Other initialization code
135
+ // Create bottom bar container
136
+ createButtonContainer()
137
+ setContentView(buttonContainer)
138
+ }
139
+
140
+ private fun createButtonContainer() {
141
+ buttonContainer = LinearLayout(this).apply {
142
+ orientation = LinearLayout.HORIZONTAL
143
+ gravity = Gravity.CENTER
144
+ layoutParams = FrameLayout.LayoutParams(
145
+ FrameLayout.LayoutParams.MATCH_PARENT,
146
+ FrameLayout.LayoutParams.WRAP_CONTENT
147
+ ).apply {
148
+ gravity = Gravity.BOTTOM
149
+ bottomMargin = dpToPx(80)
150
+ }
151
+ }
152
+ }
153
+ }
154
+ ```
155
+ 2. **Add Hang Up Button:** Insert a hang up button into the bottom toolbar. On click, call the [hangup](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-store/hangup.html) API and close the call screen.
156
+
157
+ ``` java
158
+ import io.trtc.tuikit.atomicxcore.api.call.CallStore
159
+ import io.trtc.tuikit.atomicxcore.api.view.CallCoreView
160
+ import io.trtc.tuikit.atomicxcore.api.device.DeviceStore
161
+
162
+ class CallActivity : AppCompatActivity() {
163
+ private var buttonContainer: Button? = null
164
+ private var buttonHangup: Button? = null
165
+
166
+ override fun onCreate(savedInstanceState: Bundle?) {
167
+ super.onCreate(savedInstanceState)
168
+ // Other initialization code
169
+ // 1. Add hang up button to bottom toolbar
170
+ addHangupButton()
171
+ setContentView(buttonContainer)
172
+ }
173
+
174
+ private fun addHangupButton() {
175
+ buttonHangup = Button(this).apply {
176
+ text = "Hang Up"
177
+ layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f).apply {
178
+ marginEnd = dpToPx(8)
179
+ }
180
+ setOnClickListener {
181
+ // 2. Call hangup API and close the screen
182
+ CallStore.shared.hangup(null)
183
+ finish()
184
+ }
185
+ }
186
+ buttonContainer?.addView(buttonHangup)
187
+ }
188
+ }
189
+ ```
190
+ 3. **Add Microphone Toggle Button:** Add a microphone toggle button to the toolbar. On click, call [openLocalMicrophone](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.device/-device-store/open-local-microphone.html) or [closeLocalMicrophone](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.device/-device-store/close-local-microphone.html) as needed.
191
+
192
+ ``` java
193
+ import io.trtc.tuikit.atomicxcore.api.call.CallStore
194
+ import io.trtc.tuikit.atomicxcore.api.view.CallCoreView
195
+ import io.trtc.tuikit.atomicxcore.api.device.DeviceStore
196
+
197
+ class CallActivity : AppCompatActivity() {
198
+ private var buttonContainer: Button? = null
199
+ private var buttonMicrophone: Button? = null
200
+
201
+ override fun onCreate(savedInstanceState: Bundle?) {
202
+ super.onCreate(savedInstanceState)
203
+ // Other initialization code
204
+ // 1. Add microphone toggle to bottom toolbar
205
+ addMicrophoneButton()
206
+ setContentView(buttonContainer)
207
+ }
208
+
209
+ private fun addMicrophoneButton() {
210
+ buttonMicrophone = Button(this).apply {
211
+ layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f).apply {
212
+ setMargins(16, 0, 16, 0)
213
+ }
214
+ setOnClickListener {
215
+ // 2. Toggle microphone on click
216
+ val isMicrophoneOpen = DeviceStore.shared().deviceState.microphoneStatus.value == DeviceStatus.ON
217
+ if (isMicrophoneOpen) {
218
+ DeviceStore.shared().closeLocalMicrophone()
219
+ } else {
220
+ DeviceStore.shared().openLocalMicrophone(null)
221
+ }
222
+ }
223
+ }
224
+ val isMicrophoneOpen = DeviceStore.shared().deviceState.microphoneStatus.value == DeviceStatus.ON
225
+ buttonMicrophone?.text = if (isMicrophoneOpen) "Mute Microphone" else "Unmute Microphone"
226
+ buttonContainer?.addView(buttonMicrophone)
227
+ }
228
+ }
229
+ ```
230
+ 4. **Add Camera Toggle Button:** Add a camera toggle button to the toolbar. On click, call [openLocalCamera](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.device/-device-store/open-local-camera.html) or [closeLocalCamera](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.device/-device-store/close-local-camera.html) as needed.
231
+
232
+ ``` java
233
+ import io.trtc.tuikit.atomicxcore.api.call.CallStore
234
+ import io.trtc.tuikit.atomicxcore.api.view.CallCoreView
235
+ import io.trtc.tuikit.atomicxcore.api.device.DeviceStore
236
+
237
+ class CallActivity : AppCompatActivity() {
238
+ private var buttonContainer: Button? = null
239
+ private var buttonCamera: Button? = null
240
+
241
+ override fun onCreate(savedInstanceState: Bundle?) {
242
+ super.onCreate(savedInstanceState)
243
+ // Other initialization code
244
+ // 1. Add camera toggle button to bottom toolbar
245
+ addCameraButton()
246
+ setContentView(buttonContainer)
247
+ }
248
+
249
+ private fun addCameraButton() {
250
+ buttonCamera = Button(this).apply {
251
+ layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f).apply {
252
+ setMargins(16, 0, 16, 0)
253
+ }
254
+ setOnClickListener {
255
+ // 2. Toggle camera on click
256
+ val isCameraOpen = DeviceStore.shared().deviceState.cameraStatus.value == DeviceStatus.ON
257
+ if (isCameraOpen) {
258
+ DeviceStore.shared().closeLocalCamera()
259
+ } else {
260
+ val isFrontCamera = DeviceStore.shared().deviceState.isFrontCamera.value
261
+ DeviceStore.shared().openLocalCamera(isFrontCamera, null)
262
+ }
263
+ }
264
+ }
265
+ val isCameraOpen = DeviceStore.shared().deviceState.cameraStatus.value == DeviceStatus.ON
266
+ buttonCamera?.text = if (isCameraOpen) "Turn Off Camera" else "Turn On Camera"
267
+ buttonContainer?.addView(buttonCamera)
268
+ }
269
+ }
270
+ ```
271
+ 5. **Update Button Text in Real Time:** Listen for microphone and camera status changes and update button text accordingly.
272
+
273
+ ``` java
274
+ import io.trtc.tuikit.atomicxcore.api.call.*
275
+ import io.trtc.tuikit.atomicxcore.api.device.DeviceStore
276
+ import kotlinx.coroutines.*
277
+
278
+ class CallActivity : AppCompatActivity() {
279
+ private var buttonCamera: Button? = null
280
+ private var buttonMicrophone: Button? = null
281
+
282
+ override fun onCreate(savedInstanceState: Bundle?) {
283
+ super.onCreate(savedInstanceState)
284
+ // Other initialization code
285
+ // 1. Observe microphone and camera status
286
+ observeDeviceState()
287
+ }
288
+
289
+ private fun observeDeviceState() {
290
+ deviceStateJob = CoroutineScope(Dispatchers.Main).launch {
291
+ supervisorScope {
292
+ launch {
293
+ DeviceStore.shared().deviceState.cameraStatus.collect { status ->
294
+ // 2. Update camera button text
295
+ buttonCamera?.text = if (status == DeviceStatus.ON) "Turn Off Camera" else "Turn On Camera"
296
+ }
297
+ }
298
+ launch {
299
+ DeviceStore.shared().deviceState.microphoneStatus.collect { status ->
300
+ // 2. Update microphone button text
301
+ buttonMicrophone?.text = if (status == DeviceStatus.ON) "Mute Microphone" else "Unmute Microphone"
302
+ }
303
+ }
304
+ }
305
+ }
306
+ }
307
+ }
308
+ ```
309
+
310
+ ### Step 3: Request Microphone and Camera Permissions
311
+
312
+ Before making a call, check for audio and video permissions. If permissions are missing, prompt the user to grant them dynamically.
313
+ 1. **Declare permissions:** Add camera and microphone permissions to your `AndroidManifest.xml`.
314
+
315
+ ``` xml
316
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
317
+ <!-- Microphone permission -->
318
+ <uses-permission android:name="android.permission.RECORD_AUDIO" />
319
+ <!-- Camera permission -->
320
+ <uses-permission android:name="android.permission.CAMERA" />
321
+
322
+ <application>
323
+ <!-- ... -->
324
+ <activity
325
+ android:name=".CallActivity"
326
+ android:exported="false"
327
+ android:screenOrientation="portrait" />
328
+ </application>
329
+ </manifest>
330
+ ```
331
+ 1. **Request permissions at runtime:** Dynamically request audio and video permissions as needed when making a call.
332
+
333
+ ``` java
334
+ // Request permissions dynamically
335
+ private fun requestAllCallPermissions() {
336
+ val allPermissions = arrayOf(
337
+ Manifest.permission.CAMERA,
338
+ Manifest.permission.RECORD_AUDIO
339
+ )
340
+
341
+ if (!checkPermissions(allPermissions)) {
342
+ ActivityCompat.requestPermissions(this, allPermissions, PERMISSION_REQUEST_CODE)
343
+ }
344
+ }
345
+
346
+ // Handle permission request result
347
+ override fun onRequestPermissionsResult(
348
+ requestCode: Int,
349
+ permissions: Array<out String>,
350
+ grantResults: IntArray
351
+ ) {
352
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults)
353
+
354
+ if (requestCode == PERMISSION_REQUEST_CODE) {
355
+ // Check if all permissions are granted
356
+ var allGranted = true
357
+ for (result in grantResults) {
358
+ if (result != PackageManager.PERMISSION_GRANTED) {
359
+ allGranted = false
360
+ break
361
+ }
362
+ }
363
+ if (allGranted) {
364
+ // Permissions granted
365
+ } else {
366
+ // Some permissions denied
367
+ }
368
+ }
369
+ }
370
+ ```
371
+
372
+ ### Step 4: Make a Call
373
+
374
+ After the [calls](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-store/calls.html) API succeeds, navigate to the call screen. For a better experience, enable the microphone (and camera for video calls) automatically based on the media type.
375
+ 1. **Initiate the call:** Use the `calls` API to start a call.
376
+
377
+ 2. **Enable media devices:** Once the call is initiated, turn on the microphone; for video calls, also enable the camera.
378
+
379
+ 3. **Open the call screen:** On successful call initiation, launch the call Activity.
380
+
381
+ ``` java
382
+ import io.trtc.tuikit.atomicxcore.api.CompletionHandler
383
+ import io.trtc.tuikit.atomicxcore.api.call.CallMediaType
384
+ import io.trtc.tuikit.atomicxcore.api.call.CallStore
385
+
386
+ class MainActivity : ComponentActivity() {
387
+
388
+ // 1. Make a call
389
+ private fun startCall(userIdList: List<String>, mediaType: CallMediaType) {
390
+ CallStore.shared.calls(userIdList, mediaType, null, object : CompletionHandler {
391
+ override fun onFailure(code: Int, desc: String) {
392
+ }
393
+
394
+ override fun onSuccess() {
395
+ // 2. Enable media devices
396
+ openDeviceForMediaType(mediaType)
397
+ // 3. Launch call screen
398
+ val intent = Intent(this@MainActivity, CallActivity::class.java)
399
+ startActivity(intent)
400
+ }
401
+ })
402
+ }
403
+
404
+ private fun openDeviceForMediaType(mediaType: CallMediaType?) {
405
+ if (mediaType == null) {
406
+ return
407
+ }
408
+ DeviceStore.shared().openLocalMicrophone(null)
409
+ if (mediaType == CallMediaType.Video) {
410
+ val isFrontCamera = DeviceStore.shared().deviceState.isFrontCamera.value
411
+ DeviceStore.shared().openLocalCamera(isFrontCamera, null)
412
+ }
413
+ }
414
+ }
415
+ ```
416
+ - **calls API Parameter Reference:**
417
+
418
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Required</strong> | <strong>Description</strong> |
419
+ | --- | --- | --- | --- |
420
+ | userIdList | List | Yes | List of target user <code>userId</code>s. |
421
+ | mediaType | <a href="https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-media-type/index.html">CallMediaType</a> | Yes | Call media type: audio or video.<br>- <code>CallMediaType.Video</code>: Video call.<br>- <code>CallMediaType.Audio</code>: Audio call. |
422
+ | params | <a href="https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-params/index.html">CallParams</a> | No | Optional call parameters, such as room ID, call invitation timeout, etc.<br>- <code>roomId</code> (String): Room ID, optional. If not specified, the server assigns one.<br>- <code>timeout</code> (Int): Call timeout (seconds).<br>- <code>userData</code> (String): Custom user data.<br>- <code>chatGroupId</code> (String): Chat group ID for group calls.<br>- <code>isEphemeralCall</code> (Boolean): If true, the call is encrypted and not logged. |
423
+
424
+ ### Step 5: End the Call
425
+
426
+ Whether the local user hangs up via [hangup](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-store/hangup.html) or the remote party ends the call, the [onCallEnded](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-listener/on-call-ended.html) callback is fired. Subscribe to it and finish the call Activity when the call ends.
427
+ 1. **Listen for call end events:** Subscribe to the `onCallEnded` event.
428
+
429
+ 2. **Close the call screen:** When `onCallEnded` is triggered, finish the Activity.
430
+
431
+ ``` java
432
+ import io.trtc.tuikit.atomicxcore.api.call.CallEndReason
433
+ import io.trtc.tuikit.atomicxcore.api.call.CallListener
434
+ import io.trtc.tuikit.atomicxcore.api.call.CallMediaType
435
+ import io.trtc.tuikit.atomicxcore.api.call.CallStore
436
+
437
+ class CallActivity : AppCompatActivity() {
438
+
439
+ private var callListener: CallListener? = null
440
+
441
+ override fun onCreate(savedInstanceState: Bundle?) {
442
+ super.onCreate(savedInstanceState)
443
+ // ... Other initialization code
444
+ // 1. Listen for call end event
445
+ addListener()
446
+ }
447
+
448
+ private fun addListener() {
449
+ callListener = object : CallListener() {
450
+ override fun onCallEnded(callId: String, mediaType: CallMediaType, reason: CallEndReason, userId: String) {
451
+ // 2. Close call screen
452
+ finish()
453
+ }
454
+ }
455
+ callListener?.let { CallStore.shared.addListener(it) }
456
+ }
457
+ }
458
+ ```
459
+ - **onCallEnded Event Parameters:**
460
+
461
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Description</strong> |
462
+ | --- | --- | --- |
463
+ | callId | String | Unique identifier for the call. |
464
+ | mediaType | <a href="https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-media-type/index.html">CallMediaType</a> | Call media type: audio or video.<br>- <code>CallMediaType.Video</code>: Video call.<br>- <code>CallMediaType.Audio</code>: Audio call. |
465
+ | reason | <a href="https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-end-reason/index.html">CallEndReason</a> | Reason for call end.<br>- <code>Unknown</code>: Unknown reason.<br>- <code>Hangup</code>: User ended the call.<br>- <code>Reject</code>: Callee rejected the call.<br>- <code>NoResponse</code>: No answer within timeout.<br>- <code>Offline</code>: Callee is offline.<br>- <code>LineBusy</code>: Callee is busy.<br>- <code>Canceled</code>: Caller canceled before callee answered.<br>- <code>OtherDeviceAccepted</code>: Call answered on another device.<br>- <code>OtherDeviceReject</code>: Call rejected on another device.<br>- <code>EndByServer</code>: Call ended by server. |
466
+ | userId | String | ID of the user who triggered the end event. |
467
+
468
+ ### Result
469
+
470
+ Once you complete these five steps, your app will look like this:
471
+
472
+ ## Customization
473
+
474
+ **CallCoreView** supports rich UI customization, including avatars and volume indicators. You can download ready-to-use icons from [GitHub](https://github.com/Tencent-RTC/TUIKit_Android/tree/main/call/tuicallkit-kt/src/main/res) to speed up integration; they are designed for TUICallKit and free for commercial use.
475
+
476
+ ### Custom Volume Indicator Icons
477
+
478
+ Use the [setVolumeLevelIcons](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.view/-call-core-view/set-volume-level-icons.html) method to assign custom icons for each volume level.
479
+
480
+ - **setVolumeLevelIcons Example:**
481
+
482
+ ``` java
483
+ private fun setIconResourcePath() {
484
+ val volumeLevelIcons = mapOf(VolumeLevel.Mute to "path/to/icon/resource")
485
+ val callCoreView = CallCoreView(context)
486
+ callCoreView.setVolumeLevelIcons(volumeLevelIcons)
487
+ }
488
+ ```
489
+ - **setVolumeLevelIcons API Parameters:**
490
+
491
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Required</strong> | <strong>Description</strong> |
492
+ | --- | --- | --- | --- |
493
+ | icons | Map | Yes | Maps each volume level to an icon resource. Key (VolumeLevel):<br>- <code>VolumeLevel.Mute</code>: Microphone muted.<br>- <code>VolumeLevel.Low</code>: Volume (0-25].<br>- <code>VolumeLevel.Medium</code>: Volume (25-50].<br>- <code>VolumeLevel.High</code>: Volume (50-75].<br>- <code>VolumeLevel.Peak</code>: Volume (75-100].<br>Value (String): Path to the icon resource for each level. |
494
+
495
+ - **Volume Indicator Icons:**
496
+
497
+ |**Icon**|**Description**|
498
+ |---------|---------|
499
+ ||Volume indicator. Use for `VolumeLevel.Low` or `VolumeLevel.Medium` when the user's volume is above the corresponding threshold.|
500
+ ||Mute indicator. Use for `VolumeLevel.Mute` when the user is muted.|
501
+
502
+ ### Custom Network Indicator Icons
503
+
504
+ Use [setNetworkQualityIcons](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.view/-call-core-view/set-network-quality-icons.html) to set custom icons for different network statuses.
505
+
506
+ - **setNetworkQualityIcons Example:**
507
+
508
+ ``` java
509
+ private fun setNetworkQualityIcons() {
510
+ val volumeLevelIcons = mapOf(NetworkQuality.BAD to "path/to/icon")
511
+ val callCoreView = CallCoreView(context)
512
+ callCoreView.setNetworkQualityIcons(volumeLevelIcons)
513
+ }
514
+ ```
515
+ - **setNetworkQualityIcons API Parameters:**
516
+
517
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Required</strong> | <strong>Description</strong> |
518
+ | --- | --- | --- | --- |
519
+ | icons | Map | Yes | Maps each network quality level to an icon resource. Key (NetworkQuality):<br>- <code>NetworkQuality.UNKNOWN</code>: Unknown.<br>- <code>NetworkQuality.EXCELLENT</code>: Excellent.<br>- <code>NetworkQuality.GOOD</code>: Good.<br>- <code>NetworkQuality.POOR</code>: Poor.<br>- <code>NetworkQuality.BAD</code>: Bad.<br>- <code>NetworkQuality.VERY_BAD</code>: Very bad.<br>- <code>NetworkQuality.DOWN</code>: Disconnected.<br>Value (String): Path to the icon resource for each status. |
520
+
521
+ - **Poor Network Indicator Icon:**
522
+
523
+ |**Icon**|**Description**|
524
+ |---------|---------|
525
+ ||Poor network indicator. Use for `NetworkQuality.BAD`, `VERY_BAD`, or `DOWN` when the network is poor or disconnected.|
526
+
527
+ ### Custom Default Avatar
528
+
529
+ Use [setParticipantAvatars](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/zh/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.view/-call-core-view/set-participant-avatars.html) to assign avatars to users. We recommend observing the data streams of [allParticipants](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/zh/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-state/all-participants.html): display custom avatars when available, and fall back to the default avatar if not set or if loading fails.
530
+ - **setParticipantAvatars Example:**
531
+
532
+ ``` java
533
+ private fun setParticipantAvatars() {
534
+ val avatars: MutableMap<String, String> = mutableMapOf()
535
+ val userId = "" // User ID
536
+ val avatarPath = "" // Path to user's default avatar resource
537
+ avatars[userId] = avatarPath
538
+ val callCoreView = CallCoreView(context)
539
+ callCoreView.setParticipantAvatars(avatars)
540
+ }
541
+ ```
542
+ - **setParticipantAvatars API Parameters:**
543
+
544
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Required</strong> | <strong>Description</strong> |
545
+ | --- | --- | --- | --- |
546
+ | icons | Map | Yes | Maps user IDs to avatar resources.<br>- Key: User's userID.<br>- Value: Absolute path to the user's avatar resource. |
547
+
548
+ - **Default Avatar Resource:**
549
+
550
+ |**Icon**|**Description**|
551
+ |---------|---------|
552
+ ||Default avatar. Use when a user's avatar is not set or fails to load.|
553
+
554
+ ### Custom Loading Animation
555
+
556
+ Use [setWaitingAnimation](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.view/-call-core-view/set-waiting-animation.html) to set a GIF animation for users in the waiting state, improving the user experience.
557
+
558
+ - **setWaitingAnimation Example:**
559
+
560
+ ``` java
561
+ private fun setWaitingAnimation() {
562
+ val waitingAnimationPath = "" // Path to waiting animation GIF resource
563
+ val callCoreView = CallCoreView(context)
564
+ callCoreView.setWaitingAnimation(waitingAnimationPath)
565
+ }
566
+ ```
567
+ - **setWaitingAnimation API Parameters:**
568
+
569
+ |**Parameter**|**Type**|**Required**|**Description**|
570
+ |---------|---------|---------|---------|
571
+ |path|String|Yes|Absolute path to the GIF animation resource.|
572
+
573
+ - **Waiting Animation:**
574
+
575
+ |**Icon**|**Description**|
576
+ |---------|---------|
577
+ ||Waiting-for-answer animation. Use in group calls when a participant's status is waiting.|
578
+
579
+ ### Add Call Duration Display
580
+
581
+ You can display call duration in real time using the [activeCall](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-state/active-call.html)`duration` field.
582
+ 1. **Subscribe to the data layer:** Observe `CallStore.observerState.activeCall` for updates to the current call.
583
+
584
+ 2. **Bind duration data:** Bind `activeCall.duration` to a UI control. The UI updates automatically—no need to manage a timer manually.
585
+
586
+ ``` java
587
+ import android.content.Context
588
+ import androidx.appcompat.widget.AppCompatTextView
589
+ import androidx.core.content.ContextCompat
590
+ import com.tencent.qcloud.tuicore.util.DateTimeUtil
591
+ import io.trtc.tuikit.atomicxcore.api.call.CallStore
592
+ import io.trtc.tuikit.atomicxcore.api.call.CallParticipantStatus
593
+ import kotlinx.coroutines.CoroutineScope
594
+ import kotlinx.coroutines.Dispatchers
595
+ import kotlinx.coroutines.Job
596
+ import kotlinx.coroutines.launch
597
+
598
+ class TimerView(context: Context) : AppCompatTextView(context) {
599
+ private var subscribeStateJob: Job? = null
600
+
601
+ override fun onAttachedToWindow() {
602
+ super.onAttachedToWindow()
603
+ // 1. Subscribe to activeCall
604
+ registerActiveCallObserver()
605
+ }
606
+
607
+ private fun registerActiveCallObserver() {
608
+ subscribeStateJob = CoroutineScope(Dispatchers.Main).launch {
609
+ CallStore.shared.observerState.activeCall.collect { activeCall ->
610
+ // 2. Bind call duration data, update timer
611
+ updateDurationView(activeCall)
612
+ }
613
+ }
614
+ }
615
+
616
+ private fun updateDurationView(activeCall: CallInfo) {
617
+ val currentDuration = activeCall.duration
618
+ text = DateTimeUtil.formatSecondsTo00(currentDuration.toInt())
619
+ }
620
+
621
+ override fun onDetachedFromWindow() {
622
+ super.onDetachedFromWindow()
623
+ subscribeStateJob?.cancel()
624
+ }
625
+ }
626
+ ```
627
+
628
+ > **Note:**
629
+ >
630
+
631
+ > For more reactive call status data, see [CallState](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-state/index.html).
632
+ >
633
+
634
+ ## More Features
635
+
636
+ ### Set Avatar and Nickname
637
+
638
+ Before a call starts, use [setSelfInfo](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.login/-login-store/set-self-info.html) to set your nickname and avatar.
639
+ - **setSelfInfo Example:**
640
+
641
+ ``` java
642
+ val user = UserProfile()
643
+ user.userID = "" // Your userId
644
+ user.avatarURL = "" // Avatar URL
645
+ user.nickname = "" // Nickname to set
646
+ LoginStore.shared.setSelfInfo(user, object : CompletionHandler {
647
+ override fun onSuccess() {
648
+ // Success callback
649
+ }
650
+
651
+ override fun onFailure(code: Int, desc: String) {
652
+ // Failure callback
653
+ }
654
+ })
655
+ ```
656
+ - **setSelfInfo API Parameters:**
657
+
658
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Required</strong> | <strong>Description</strong> |
659
+ | --- | --- | --- | --- |
660
+ | userProfile | <a href="https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.login/-user-profile/index.html">UserProfile</a> | Yes | User profile struct.<br>- <code>userID</code> (String): User ID.<br>- <code>avatarURL</code> (String): Avatar URL.<br>- <code>nickname</code> (String): Nickname.<br>See <a href="https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.login/-user-profile/index.html">UserProfile</a> for more fields. |
661
+ | completion | CompletionHandler | No | Callback for the result of the operation. |
662
+
663
+ ### Switch Layout Mode
664
+
665
+ Use [setLayoutTemplate](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.view/-call-core-view/set-layout-template.html) to switch between layout modes. If not set, **CallCoreView** adapts automatically: 1v1 calls use `Float` mode by default, while multi-party calls use `Grid` mode. Layout mode descriptions:
666
+ | <strong>Float Mode</strong> | <strong>Grid Mode</strong> | <strong>PIP Mode</strong> |
667
+ | --- | --- | --- |
668
+ | | | |
669
+ | - <strong>Layout:</strong> Full screen self-view while waiting; after connecting, full screen remote view with self-view as a floating window.<br>- <strong>Interaction:</strong> Floating window supports drag and click-to-swap with the main view. | - <strong>Layout:</strong> Grid layout for all participants, suitable for 2+ users. Supports click-to-enlarge.<br>- <strong>Interaction:</strong> Click any participant's view to enlarge. | - <strong>Layout:</strong> 1v1 shows fixed remote view; multi-party uses active speaker strategy with full screen for the current speaker.<br>- <strong>Interaction:</strong> Waiting state shows self-view; after connecting, call duration is displayed. |
670
+
671
+ - **setLayoutTemplate Example:**
672
+
673
+ ``` java
674
+ private fun setLayoutTemplate() {
675
+ val callCoreView = CallCoreView(context)
676
+ val template = CallLayoutTemplate.Grid
677
+ // Set layout mode
678
+ callCoreView.setLayoutTemplate(template)
679
+ setContentView(callCoreView)
680
+ }
681
+ ```
682
+ - **setLayoutTemplate API Parameters:**
683
+
684
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Required</strong> | <strong>Description</strong> |
685
+ | --- | --- | --- | --- |
686
+ | template | <a href="https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.view/-call-layout-template/index.html">CallLayoutTemplate</a> | Yes | CallCoreView layout mode.<br>- <code>CallLayoutTemplate.Float</code>: Full screen self-view while waiting; after connecting, full screen remote view with self-view as a floating window.<br>- <code>CallLayoutTemplate.Grid</code>: Grid layout for all members, suitable for 2+ participants, supports click-to-enlarge.<br>- <code>CallLayoutTemplate.Pip</code>: 1v1 fixed remote view; multi-party uses active speaker strategy. |
687
+
688
+ ### Set Default Call Timeout
689
+
690
+ When making a call with [calls](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-store/calls.html), set the `timeout` field in [CallParams](https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-params/index.html) to specify the waiting timeout.
691
+ ``` java
692
+ val callParams = CallParams()
693
+ callParams.timeout = 30 // Set call timeout
694
+ CallStore.shared.calls(userIdList, CallMediaType.Video, callParams, null)
695
+ ```
696
+ - **calls API Parameter Reference:**
697
+
698
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Required</strong> | <strong>Description</strong> |
699
+ | --- | --- | --- | --- |
700
+ | userIdList | List | Yes | List of target userIds. |
701
+ | mediaType | <a href="https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-media-type/index.html">CallMediaType</a> | Yes | Call media type: audio or video.<br>- <code>CallMediaType.Video</code>: Video call.<br>- <code>CallMediaType.Audio</code>: Audio call. |
702
+ | params | <a href="https://liteav.sdk.cloudcachetci.com/doc/product/tuikit/atomic-x/android/en/-atomic-x%20-core%20-a-p-i/io.trtc.tuikit.atomicxcore.api.call/-call-params/index.html">CallParams</a> | No | Optional call parameters, such as room ID, call invitation timeout, etc.<br>- <code>roomId</code> (String): Room ID, optional.<br>- <code>timeout</code> (Int): Call timeout (seconds).<br>- <code>userData</code> (String): Custom user data.<br>- <code>chatGroupId</code> (String): Chat group ID for group calls.<br>- <code>isEphemeralCall</code> (Boolean): If true, the call is encrypted and not logged. |
703
+
704
+ ### Implement Picture-in-Picture (PiP)
705
+
706
+ Picture-in-Picture requires Android 8.0 (API 26) or higher. For best results, switch **CallCoreView** to `Pip` layout when entering PiP mode.
707
+ - **Start PiP:** Call the system method `enterPictureInPictureMode`.
708
+
709
+ ``` java
710
+ private fun enterPictureInPictureModeWithBuild() {
711
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && hasPipModePermission()) {
712
+ val pictureInPictureParams: PictureInPictureParams.Builder = PictureInPictureParams.Builder()
713
+ val floatViewWidth = resources.getDimensionPixelSize(R.dimen.callkit_video_small_view_width)
714
+ val floatViewHeight = resources.getDimensionPixelSize(R.dimen.callkit_video_small_view_height)
715
+ val aspectRatio = Rational(floatViewWidth, floatViewHeight)
716
+ pictureInPictureParams.setAspectRatio(aspectRatio).build()
717
+ this.enterPictureInPictureMode(pictureInPictureParams.build())
718
+ }
719
+ }
720
+ ```
721
+ - **On PiP Entered:** In `onPictureInPictureModeChanged`, set **CallCoreView** layout to **Pip** when entering PiP mode.
722
+
723
+ ``` java
724
+ val callCoreView = CallCoreView(context)
725
+
726
+ override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean) {
727
+ super.onPictureInPictureModeChanged(isInPictureInPictureMode)
728
+ if (isInPictureInPictureMode) {
729
+ callCoreView.setLayoutTemplate(CallLayoutTemplate.Pip)
730
+ }
731
+ }
732
+ ```
733
+ - **Return from PiP:** When returning from PiP (full screen), `onResume` is triggered. Reset the layout based on participant count: use `Float` for 1v1, `Grid` for multi-party.
734
+
735
+ ``` java
736
+ val callCoreView = CallCoreView(context)
737
+
738
+ override fun onResume() {
739
+ super.onResume()
740
+ val allParticipants = CallStore.shared.observerState.allParticipants.value
741
+ if (allParticipants.size > 2) {
742
+ callCoreView?.setLayoutTemplate(CallLayoutTemplate.Grid)
743
+ } else {
744
+ callCoreView?.setLayoutTemplate(CallLayoutTemplate.Float)
745
+ }
746
+ }
747
+ ```
748
+
749
+ ### Keep Screen Awake During Call
750
+
751
+ To keep the screen on during a call, use the `WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON` flag. This is the recommended approach.
752
+ ``` java
753
+ class CallActivity : AppCompatActivity() {
754
+ override fun onCreate(savedInstanceState: Bundle?) {
755
+ super.onCreate(savedInstanceState)
756
+
757
+ window.addFlags(
758
+ WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or // Show when locked
759
+ WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or // Dismiss keyguard
760
+ WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON or // Keep screen on
761
+ WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON // Turn screen on
762
+ )
763
+
764
+ setContentView(R.layout.activity_call)
765
+ }
766
+ }
767
+ ```
768
+
769
+ ### Play Waiting Ringtone
770
+
771
+ You can observe call state and play a ringtone while waiting for an answer. Stop the ringtone when the call is answered or ends.
772
+ ``` java
773
+ MainScope().launch {
774
+ CallStore.shared.observerState.selfInfo.collect { selfInfo ->
775
+ if (selfInfo.status == CallParticipantStatus.Accept || selfInfo.status == CallParticipantStatus.None) {
776
+ // Stop ringtone
777
+ return@collect
778
+ }
779
+ if (selfInfo.status == CallParticipantStatus.Waiting) {
780
+ // Play ringtone
781
+ }
782
+ }
783
+ ```
784
+
785
+ ### Enable Background Audio/Video Capture
786
+ 1. **Configure permissions and service (AndroidManifest.xml):** Starting with Android 9.0 (API 28), you must declare foreground service permissions. Android 14 (API 34) requires explicit service types (microphone and camera).
787
+
788
+ ``` java
789
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
790
+
791
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
792
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
793
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
794
+
795
+ <application>
796
+ <service
797
+ android:name=".CallForegroundService"
798
+ android:enabled="true"
799
+ android:exported="false"
800
+ android:foregroundServiceType="camera|microphone" />
801
+ </application>
802
+ </manifest>
803
+ ```
804
+ 2. **Create a Foreground Service class (CallForegroundService):**
805
+
806
+ ``` java
807
+ import android.app.Notification
808
+ import android.app.NotificationChannel
809
+ import android.app.NotificationManager
810
+ import android.app.Service
811
+ import android.content.Context
812
+ import android.content.Intent
813
+ import android.os.Build
814
+ import android.os.IBinder
815
+ import androidx.core.app.NotificationCompat
816
+
817
+ class CallForegroundService : Service() {
818
+ companion object {
819
+ private const val NOTIFICATION_ID = 1001
820
+ private const val CHANNEL_ID = "call_foreground_channel"
821
+
822
+ fun start(context: Context) {
823
+ val intent = Intent(context, CallForegroundService::class.java)
824
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
825
+ context.startForegroundService(intent)
826
+ } else {
827
+ context.startService(intent)
828
+ }
829
+ }
830
+
831
+ fun stop(context: Context) {
832
+ val intent = Intent(context, CallForegroundService::class.java)
833
+ context.stopService(intent)
834
+ }
835
+ }
836
+
837
+ override fun onCreate() {
838
+ super.onCreate()
839
+ createNotificationChannel()
840
+ // Start foreground notification to ensure background capture permission
841
+ startForeground(NOTIFICATION_ID, createNotification())
842
+ }
843
+
844
+ override fun onBind(intent: Intent?): IBinder? = null
845
+
846
+ private fun createNotification(): Notification {
847
+ return NotificationCompat.Builder(this, CHANNEL_ID)
848
+ .setContentTitle("In Call")
849
+ .setContentText("App is running in the background to keep the call active")
850
+ .setSmallIcon(android.R.drawable.ic_menu_call) // Replace with your app icon
851
+ .setPriority(NotificationCompat.PRIORITY_HIGH)
852
+ .build()
853
+ }
854
+
855
+ private fun createNotificationChannel() {
856
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
857
+ val channel = NotificationChannel(
858
+ CHANNEL_ID,
859
+ "Call Keep-Alive Service",
860
+ NotificationManager.IMPORTANCE_HIGH
861
+ )
862
+ val manager = getSystemService(NotificationManager::class.java)
863
+ manager.createNotificationChannel(channel)
864
+ }
865
+ }
866
+ }
867
+ ```
868
+
869
+ ## Next Steps
870
+
871
+ Congratulations! You've completed the "Make a Call" feature. Next, you can implement the **Answer the First Call** feature. See the table below for details:
872
+
873
+ |**Feature**|**Description**|**Integration Guide**|
874
+ |---------|---------|---------|
875
+ |**Answer the First Call**|Step-by-step guide to integrating the answer flow, including launching the call UI, and implementing answer and reject controls.|Answering Your First Call|
876
+
877
+ ## FAQs
878
+
879
+ ### Why does the UI show incorrectly when I open other activities after entering Picture-in-Picture?
880
+ - **Reason:** Android's PiP mode is based on the task stack. By default, all Activities share the same task stack. If you launch a new Activity during PiP, it may appear in the PiP window, causing UI issues.
881
+
882
+ - **Solution:** Declare the call Activity as a separate task stack in `AndroidManifest.xml`.
883
+
884
+ ``` xml
885
+ <activity
886
+ android:name=".view.CallActivity" <!-- Your call interface -->
887
+ android:launchMode="singleTask"
888
+ android:taskAffinity="${applicationId}.call" />
889
+ ```
890
+
891
+ ### If the callee comes online before the call invitation times out, do they get the incoming call?
892
+
893
+ For single calls, if the callee comes online within the timeout, they will receive an incoming call invitation. For group calls, up to 20 unhandled group messages are pulled when coming online within the timeout; if a call invitation exists, the incoming call event is triggered.
894
+
895
+ ## Contact Us
896
+
897
+ If you have any questions or suggestions during the integration or usage process, feel free to join our [Telegram technical group](https://t.me/+EPk6TMZEZMM5OGY1) or [contact us](https://trtc.io/contact) for support.