@tencent-rtc/mcp 1.4.7 → 1.6.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 (553) hide show
  1. package/cursor-setting.png +0 -0
  2. package/index.js +0 -1
  3. package/knowledge/bm25-cache.js +73 -0
  4. package/knowledge/bm25.js +147 -0
  5. package/knowledge/build-index.js +69 -0
  6. package/knowledge/chunker.js +167 -0
  7. package/knowledge/content-loader.js +39 -0
  8. package/knowledge/doc-url-resolver.js +142 -0
  9. package/knowledge/extractors.js +25 -0
  10. package/knowledge/path-meta.js +184 -0
  11. package/knowledge/search/exact-lookup.js +497 -0
  12. package/knowledge/search/filter-pool.js +104 -0
  13. package/knowledge/search/product-scope-intent.js +40 -0
  14. package/knowledge/search/requires-framework.js +81 -0
  15. package/knowledge/search/search-knowledge.js +229 -0
  16. package/mcp-server-prompt.png +0 -0
  17. package/package.json +1 -1
  18. package/resource/_schema/feature-aliases.yaml +10 -0
  19. package/resource/_schema/goal-tags.yaml +72 -0
  20. package/resource/_schema/products.yaml +19 -0
  21. package/resource/_schema/trtc-intents.yaml +27 -0
  22. package/resource/_schema/types.yaml +43 -0
  23. package/resource/index/component-slugs.json +1 -0
  24. package/resource/index/doc-source-urls.json +1 -0
  25. package/resource/index/manifest.json +1 -0
  26. package/resource/{doc → integration}/callkit/preset/android/integration.md +34 -28
  27. package/resource/integration/callkit/preset/flutter/integration.md +346 -0
  28. package/resource/integration/callkit/preset/ios/integration.md +408 -0
  29. package/resource/integration/callkit/preset/react/integration.md +362 -0
  30. package/resource/integration/callkit/preset/vue/integration.md +356 -0
  31. package/resource/integration/chat/preset/android/integration.md +500 -0
  32. package/resource/integration/chat/preset/flutter/integration.md +370 -0
  33. package/resource/integration/chat/preset/ios/integration.md +566 -0
  34. package/resource/integration/chat/preset/react/integration.md +490 -0
  35. package/resource/integration/chat/preset/vue/integration.md +504 -0
  36. package/resource/{doc → integration}/livekit/preset/live/vue/live-list-integration.md +26 -22
  37. package/resource/{doc → integration}/livekit/preset/live/vue/live-player-desk-integration.md +22 -18
  38. package/resource/integration/livekit/preset/live/vue/live-player-h5-integration.md +309 -0
  39. package/resource/{doc → integration}/livekit/preset/live/vue/live-pusher-integration.md +47 -39
  40. package/resource/integration/roomkit/preset/vue/integration.md +562 -0
  41. package/resource/knowledge/callkit/core-sdk/android/answer-call.md +828 -0
  42. package/resource/knowledge/callkit/core-sdk/android/make-call.md +897 -0
  43. package/resource/knowledge/callkit/core-sdk/android/offline-push.md +363 -0
  44. package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +1111 -0
  45. package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +1132 -0
  46. package/resource/{doc → knowledge}/callkit/core-sdk/flutter/offline-push.md +174 -151
  47. package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +1084 -0
  48. package/resource/knowledge/callkit/core-sdk/ios/make-call.md +1252 -0
  49. package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +534 -0
  50. package/resource/knowledge/callkit/core-sdk/uni-app/answer-call.md +953 -0
  51. package/resource/knowledge/callkit/core-sdk/uni-app/make-call.md +1061 -0
  52. package/resource/knowledge/callkit/faq/android.md +92 -0
  53. package/resource/{doc/callkit/faq/android-faq.md → knowledge/callkit/faq/common.md} +11 -12
  54. package/resource/knowledge/callkit/faq/error-code.md +67 -0
  55. package/resource/knowledge/callkit/faq/flutter.md +52 -0
  56. package/resource/knowledge/callkit/faq/ios.md +104 -0
  57. package/resource/knowledge/callkit/faq/web.md +74 -0
  58. package/resource/knowledge/callkit/preset/android/api.md +412 -0
  59. package/resource/knowledge/callkit/preset/flutter/api.md +22 -0
  60. package/resource/knowledge/callkit/preset/ios/api.md +234 -0
  61. package/resource/knowledge/callkit/preset/web/api.md +83 -0
  62. package/resource/knowledge/chat/preset/android/features/chat-setting.md +74 -0
  63. package/resource/knowledge/chat/preset/android/features/contact-list.md +43 -0
  64. package/resource/knowledge/chat/preset/android/features/conversation-list.md +117 -0
  65. package/resource/knowledge/chat/preset/android/features/language.md +136 -0
  66. package/resource/knowledge/chat/preset/android/features/message-input.md +57 -0
  67. package/resource/knowledge/chat/preset/android/features/message-list.md +142 -0
  68. package/resource/knowledge/chat/preset/android/features/search.md +64 -0
  69. package/resource/knowledge/chat/preset/android/features/theme.md +222 -0
  70. package/resource/knowledge/chat/preset/android-view/integration.md +300 -0
  71. package/resource/knowledge/chat/preset/flutter/features/chat-setting.md +64 -0
  72. package/resource/knowledge/chat/preset/flutter/features/contact-list.md +40 -0
  73. package/resource/knowledge/chat/preset/flutter/features/conversation-list.md +129 -0
  74. package/resource/knowledge/chat/preset/flutter/features/language.md +104 -0
  75. package/resource/knowledge/chat/preset/flutter/features/message-input.md +54 -0
  76. package/resource/knowledge/chat/preset/flutter/features/message-list.md +158 -0
  77. package/resource/knowledge/chat/preset/flutter/features/search.md +59 -0
  78. package/resource/knowledge/chat/preset/flutter/features/theme.md +261 -0
  79. package/resource/knowledge/chat/preset/ios/features/chat-setting.md +94 -0
  80. package/resource/knowledge/chat/preset/ios/features/contact-list.md +119 -0
  81. package/resource/knowledge/chat/preset/ios/features/conversation-list.md +134 -0
  82. package/resource/knowledge/chat/preset/ios/features/language.md +125 -0
  83. package/resource/knowledge/chat/preset/ios/features/message-input.md +69 -0
  84. package/resource/knowledge/chat/preset/ios/features/message-list.md +162 -0
  85. package/resource/knowledge/chat/preset/ios/features/search.md +93 -0
  86. package/resource/knowledge/chat/preset/ios/features/theme.md +270 -0
  87. package/resource/{doc/chatkit/ios → knowledge/chat/preset/ios-uikit}/integration.md +160 -158
  88. package/resource/knowledge/chat/preset/react/features/chat-setting.md +101 -0
  89. package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/contact-list.md +43 -41
  90. package/resource/knowledge/chat/preset/react/features/conversation-actions.md +215 -0
  91. package/resource/knowledge/chat/preset/react/features/conversation-list.md +339 -0
  92. package/resource/knowledge/chat/preset/react/features/conversation-preview.md +101 -0
  93. package/resource/knowledge/chat/preset/react/features/conversation-search.md +61 -0
  94. package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/message-input.md +117 -156
  95. package/resource/knowledge/chat/preset/react/features/message-list.md +297 -0
  96. package/resource/{doc/chatkit/react/components → knowledge/chat/preset/react/features}/search.md +65 -59
  97. package/resource/knowledge/chat/preset/react/features/theme.md +93 -0
  98. package/resource/knowledge/chat/preset/vue/features/chat-header.md +331 -0
  99. package/resource/knowledge/chat/preset/vue/features/chat-setting.md +79 -0
  100. package/resource/knowledge/chat/preset/vue/features/contact-list.md +277 -0
  101. package/resource/knowledge/chat/preset/vue/features/conversation-actions.md +234 -0
  102. package/resource/knowledge/chat/preset/vue/features/conversation-list.md +331 -0
  103. package/resource/knowledge/chat/preset/vue/features/conversation-preview.md +216 -0
  104. package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/conversation-search.md +13 -13
  105. package/resource/knowledge/chat/preset/vue/features/message-input.md +551 -0
  106. package/resource/knowledge/chat/preset/vue/features/message-list.md +350 -0
  107. package/resource/{doc/chatkit/vue/components → knowledge/chat/preset/vue/features}/search.md +79 -73
  108. package/resource/knowledge/chat/preset/vue/features/theme.md +136 -0
  109. package/resource/knowledge/chat/urls/error-code.md +17 -0
  110. package/resource/knowledge/chat/urls/product.md +43 -0
  111. package/resource/knowledge/chat/urls/restapi.md +204 -0
  112. package/resource/knowledge/chat/urls/sdk/android.md +80 -0
  113. package/resource/knowledge/chat/urls/sdk/flutter.md +71 -0
  114. package/resource/knowledge/chat/urls/sdk/ios.md +80 -0
  115. package/resource/knowledge/chat/urls/sdk/web.md +80 -0
  116. package/resource/knowledge/chat/urls/webhook.md +68 -0
  117. package/resource/knowledge/livekit/core-sdk/api-reference/android/AudioEffectStore.md +286 -0
  118. package/resource/knowledge/livekit/core-sdk/api-reference/android/BarrageStore.md +174 -0
  119. package/resource/knowledge/livekit/core-sdk/api-reference/android/BattleStore.md +329 -0
  120. package/resource/knowledge/livekit/core-sdk/api-reference/android/CameraView.md +55 -0
  121. package/resource/knowledge/livekit/core-sdk/api-reference/android/CoGuestStore.md +434 -0
  122. package/resource/knowledge/livekit/core-sdk/api-reference/android/CoHostStore.md +362 -0
  123. package/resource/knowledge/livekit/core-sdk/api-reference/android/DeviceStore.md +466 -0
  124. package/resource/knowledge/livekit/core-sdk/api-reference/android/GiftStore.md +173 -0
  125. package/resource/knowledge/livekit/core-sdk/api-reference/android/LikeStore.md +51 -0
  126. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveAudienceStore.md +291 -0
  127. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveCoreView.md +78 -0
  128. package/resource/knowledge/livekit/core-sdk/api-reference/android/LiveSeatStore.md +488 -0
  129. package/resource/knowledge/livekit/core-sdk/api-reference/android/LoginStore.md +219 -0
  130. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/AudioEffectStore.md +282 -0
  131. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BarrageStore.md +212 -0
  132. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BaseBeautyStore.md +153 -0
  133. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/BattleStore.md +312 -0
  134. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoGuestStore.md +404 -0
  135. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/CoHostStore.md +334 -0
  136. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/DeviceStore.md +426 -0
  137. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/GiftStore.md +166 -0
  138. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LikeStore.md +52 -0
  139. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveAudienceStore.md +281 -0
  140. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveCoreView.md +150 -0
  141. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LiveSeatStore.md +438 -0
  142. package/resource/knowledge/livekit/core-sdk/api-reference/flutter/LoginStore.md +190 -0
  143. package/resource/knowledge/livekit/core-sdk/api-reference/ios/AudioEffectStore.md +291 -0
  144. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BarrageStore.md +192 -0
  145. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BaseBeautyStore.md +146 -0
  146. package/resource/knowledge/livekit/core-sdk/api-reference/ios/BattleStore.md +309 -0
  147. package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoGuestStore.md +370 -0
  148. package/resource/knowledge/livekit/core-sdk/api-reference/ios/CoHostStore.md +339 -0
  149. package/resource/knowledge/livekit/core-sdk/api-reference/ios/DeviceStore.md +503 -0
  150. package/resource/knowledge/livekit/core-sdk/api-reference/ios/GiftStore.md +188 -0
  151. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LikeStore.md +51 -0
  152. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveAudienceStore.md +289 -0
  153. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveCoreView.md +78 -0
  154. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LiveSeatStore.md +487 -0
  155. package/resource/knowledge/livekit/core-sdk/api-reference/ios/LoginStore.md +183 -0
  156. package/resource/knowledge/livekit/core-sdk/api-reference/web/index.md +736 -0
  157. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audience-list.md +53 -47
  158. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-audio-effect.md +28 -24
  159. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-barrage.md +22 -18
  160. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-base-beauty.md +17 -15
  161. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-co-guest-interaction.md +19 -18
  162. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-gift.md +102 -89
  163. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-host-interaction.md +41 -37
  164. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-integration.md +45 -43
  165. package/resource/{doc → knowledge}/livekit/core-sdk/live/android/live-live-list.md +23 -20
  166. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audience-list.md +41 -41
  167. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-audio-effect.md +70 -69
  168. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-barrage.md +68 -71
  169. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-base-beauty.md +43 -47
  170. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-co-guest-interaction.md +59 -56
  171. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-gift.md +103 -105
  172. package/resource/knowledge/livekit/core-sdk/live/flutter/live-host-interaction.md +869 -0
  173. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-integration.md +84 -87
  174. package/resource/{doc → knowledge}/livekit/core-sdk/live/flutter/live-live-list.md +43 -40
  175. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audience-list.md +11 -10
  176. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-audio-effect.md +28 -24
  177. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-barrage.md +22 -18
  178. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-base-beauty.md +15 -14
  179. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-co-guest-interaction.md +19 -18
  180. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-gift.md +54 -50
  181. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-host-interaction.md +41 -37
  182. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-integration.md +40 -40
  183. package/resource/{doc → knowledge}/livekit/core-sdk/live/ios/live-live-list.md +19 -18
  184. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audience-list.md +53 -47
  185. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-audio-effect.md +28 -24
  186. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-barrage.md +22 -18
  187. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-co-guest-interaction.md +41 -33
  188. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-gift.md +94 -81
  189. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-host-interaction.md +35 -30
  190. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-integration.md +45 -42
  191. package/resource/{doc → knowledge}/livekit/core-sdk/voice/android/voice-room-list.md +23 -20
  192. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audience-list.md +260 -0
  193. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-audio-effect.md +598 -0
  194. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-barrage.md +490 -0
  195. package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-co-guest-interaction.md +65 -59
  196. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-gift.md +424 -0
  197. package/resource/{doc → knowledge}/livekit/core-sdk/voice/flutter/voice-integration.md +69 -76
  198. package/resource/knowledge/livekit/core-sdk/voice/flutter/voice-room-list.md +726 -0
  199. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audience-list.md +11 -10
  200. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-audio-effect.md +28 -24
  201. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-barrage.md +22 -18
  202. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-co-guest-interaction.md +41 -33
  203. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-gift.md +54 -50
  204. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-host-interaction.md +35 -30
  205. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-integration.md +49 -46
  206. package/resource/{doc → knowledge}/livekit/core-sdk/voice/ios/voice-room-list.md +19 -18
  207. package/resource/knowledge/livekit/faq/error-code.md +193 -0
  208. package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/barrage.md +56 -53
  209. package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-audience-list.md +22 -21
  210. package/resource/{doc/livekit/preset/live/vue/components → knowledge/livekit/preset/live/vue/features}/live-view.md +34 -32
  211. package/resource/knowledge/push/config/android.md +92 -0
  212. package/resource/knowledge/push/config/harmonyos.md +83 -0
  213. package/resource/knowledge/push/config/ios.md +254 -0
  214. package/resource/knowledge/push/config/react-native.md +254 -0
  215. package/resource/knowledge/push/config/unity.md +209 -0
  216. package/resource/knowledge/push/config/unreal-engine.md +194 -0
  217. package/resource/knowledge/push/integration/android.md +404 -0
  218. package/resource/knowledge/push/integration/flutter.md +465 -0
  219. package/resource/knowledge/push/integration/harmonyos.md +63 -0
  220. package/resource/knowledge/push/integration/ios.md +246 -0
  221. package/resource/knowledge/push/integration/react-native.md +366 -0
  222. package/resource/knowledge/push/integration/uni-app.md +208 -0
  223. package/resource/knowledge/push/integration/unity.md +389 -0
  224. package/resource/knowledge/push/integration/unreal-engine.md +390 -0
  225. package/resource/knowledge/push/overview/prepare.md +60 -0
  226. package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +241 -0
  227. package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +588 -0
  228. package/resource/knowledge/roomkit/core-sdk/android/room-state.md +364 -0
  229. package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +340 -0
  230. package/resource/knowledge/roomkit/core-sdk/flutter/call-user-to-room.md +230 -0
  231. package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +797 -0
  232. package/resource/knowledge/roomkit/core-sdk/flutter/room-state.md +325 -0
  233. package/resource/knowledge/roomkit/core-sdk/flutter/schedule-room.md +325 -0
  234. package/resource/knowledge/roomkit/core-sdk/ios/call-user-to-room.md +233 -0
  235. package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +569 -0
  236. package/resource/knowledge/roomkit/core-sdk/ios/room-state.md +325 -0
  237. package/resource/knowledge/roomkit/core-sdk/ios/schedule-room.md +322 -0
  238. package/resource/knowledge/roomkit/core-sdk/vue/call-user-to-room.md +221 -0
  239. package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/device-detection.md +49 -48
  240. package/resource/knowledge/roomkit/core-sdk/vue/device-state.md +461 -0
  241. package/resource/knowledge/roomkit/core-sdk/vue/free-beauty-panel.md +216 -0
  242. package/resource/knowledge/roomkit/core-sdk/vue/room-chat.md +370 -0
  243. package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-participant-state.md +61 -60
  244. package/resource/knowledge/roomkit/core-sdk/vue/room-state.md +280 -0
  245. package/resource/{doc/roomkit/vue/features → knowledge/roomkit/core-sdk/vue}/room-view.md +57 -56
  246. package/resource/knowledge/roomkit/core-sdk/vue/schedule-room.md +319 -0
  247. package/resource/knowledge/roomkit/core-sdk/vue/screen-share.md +267 -0
  248. package/resource/knowledge/roomkit/core-sdk/vue/virtual-background.md +261 -0
  249. package/resource/knowledge/roomkit/preset/android/integration.md +396 -0
  250. package/resource/knowledge/roomkit/preset/flutter/integration.md +404 -0
  251. package/resource/knowledge/roomkit/preset/ios/integration.md +369 -0
  252. package/resource/knowledge/roomkit/preset/react/integration.md +576 -0
  253. package/resource/knowledge/rtcengine/web/how_to_run_web_sdk_demo.md +44 -0
  254. package/resource/{doc → knowledge}/rtcengine/web/plugin/21-advanced-auto-play-policy.md +8 -2
  255. package/resource/{doc → knowledge}/rtcengine/web/plugin/22-advanced-audio-mixer.md +19 -1
  256. package/resource/{doc → knowledge}/rtcengine/web/plugin/23-advanced-support-detection.md +1 -1
  257. package/resource/{doc → knowledge}/rtcengine/web/plugin/24-advanced-network-quality.md +8 -8
  258. package/resource/{doc → knowledge}/rtcengine/web/plugin/25-advanced-device-change.md +1 -1
  259. package/resource/{doc → knowledge}/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +6 -6
  260. package/resource/{doc → knowledge}/rtcengine/web/plugin/27-advanced-small-stream.md +3 -3
  261. package/resource/{doc → knowledge}/rtcengine/web/plugin/29-advanced-water-mark.md +18 -0
  262. package/resource/{doc → knowledge}/rtcengine/web/plugin/31-advanced-plugins-overview.md +1 -1
  263. package/resource/{doc → knowledge}/rtcengine/web/plugin/34-advanced-proxy.md +2 -2
  264. package/resource/{doc → knowledge}/rtcengine/web/plugin/35-advanced-ai-denoiser.md +1 -1
  265. package/resource/knowledge/trtc/android/TRTCCloud.md +1915 -0
  266. package/resource/knowledge/trtc/android/TRTCCloudDef.md +1029 -0
  267. package/resource/knowledge/trtc/android/TRTCCloudListener.md +1095 -0
  268. package/resource/knowledge/trtc/android/TRTCStatistics.md +68 -0
  269. package/resource/knowledge/trtc/android/TXAudioEffectManager.md +502 -0
  270. package/resource/knowledge/trtc/android/TXBeautyManager.md +415 -0
  271. package/resource/knowledge/trtc/android/TXDeviceManager.md +169 -0
  272. package/resource/knowledge/trtc/android/TXLiteAVCode.md +125 -0
  273. package/resource/knowledge/trtc/c++/ITRTCCloud.md +2069 -0
  274. package/resource/knowledge/trtc/c++/ITRTCStatistics.md +73 -0
  275. package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +502 -0
  276. package/resource/knowledge/trtc/c++/ITXDeviceManager.md +391 -0
  277. package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +1191 -0
  278. package/resource/knowledge/trtc/c++/TRTCTypeDef.md +931 -0
  279. package/resource/knowledge/trtc/c++/TXLiteAVCode.md +127 -0
  280. package/resource/knowledge/trtc/ios/TRTCCloud.md +2118 -0
  281. package/resource/knowledge/trtc/ios/TRTCCloudDef.md +975 -0
  282. package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +1131 -0
  283. package/resource/knowledge/trtc/ios/TRTCStatistics.md +68 -0
  284. package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +423 -0
  285. package/resource/knowledge/trtc/ios/TXBeautyManager.md +416 -0
  286. package/resource/knowledge/trtc/ios/TXDeviceManager.md +387 -0
  287. package/resource/knowledge/trtc/ios/TXLiteAVCode.md +127 -0
  288. package/server-config.js +0 -1
  289. package/server.js +35 -12
  290. package/streamable-http.js +0 -1
  291. package/tools/call/get_native_call_uikit_integration.js +2 -4
  292. package/tools/call/get_native_callkit_core_integration.js +2 -6
  293. package/tools/call/get_web_call_uikit_integration.js +2 -4
  294. package/tools/chat/get_native_chat_uikit_integration.js +2 -4
  295. package/tools/chat/get_web_chat_uikit_integration.js +2 -4
  296. package/tools/common/get_usersig.js +0 -1
  297. package/tools/common/present_framework_choice.js +19 -14
  298. package/tools/common/record_answer.js +19 -26
  299. package/tools/common/record_feedback.js +17 -31
  300. package/tools/common/search_trtc_knowledge.js +44 -0
  301. package/tools/definitions/get_native_call_uikit_integration_def.js +3 -2
  302. package/tools/definitions/get_native_callkit_core_integration_def.js +5 -4
  303. package/tools/definitions/get_native_chat_uikit_integration_def.js +5 -3
  304. package/tools/definitions/get_native_livekit_core_integration_def.js +6 -6
  305. package/tools/definitions/get_usersig_def.js +0 -1
  306. package/tools/definitions/get_web_call_uikit_integration_def.js +4 -3
  307. package/tools/definitions/get_web_chat_uikit_integration_def.js +2 -1
  308. package/tools/definitions/get_web_live_uikit_integration_def.js +5 -6
  309. package/tools/definitions/get_web_room_core_integration_def.js +49 -0
  310. package/tools/definitions/get_web_room_uikit_integration_def.js +5 -5
  311. package/tools/definitions/integration-boundary.js +5 -0
  312. package/tools/definitions/present_framework_choice_def.js +12 -11
  313. package/tools/definitions/record_answer_def.js +19 -18
  314. package/tools/definitions/record_feedback_def.js +14 -14
  315. package/tools/definitions/search_trtc_knowledge_def.js +39 -0
  316. package/tools/index.js +5 -37
  317. package/tools/live/get_native_livekit_core_integration.js +1 -4
  318. package/tools/live/get_web_live_uikit_integration.js +2 -5
  319. package/tools/room/get_web_room_core_integration.js +47 -0
  320. package/tools/room/get_web_room_uikit_integration.js +2 -4
  321. package/utils/generate-structured-result.js +24 -31
  322. package/utils/generate-usersig.js +0 -1
  323. package/utils/get-device-identifier.js +0 -1
  324. package/utils/get-doc-content.js +14 -9
  325. package/utils/http-get.js +0 -1
  326. package/utils/http-post.js +0 -1
  327. package/utils/report-cls-client.js +18 -21
  328. package/utils/report-es-client.js +1 -2
  329. package/index.js.map +0 -1
  330. package/resource/doc/callkit/core-sdk/.gitkeep +0 -0
  331. package/resource/doc/callkit/core-sdk/android/answer-call.md +0 -852
  332. package/resource/doc/callkit/core-sdk/android/make-call.md +0 -954
  333. package/resource/doc/callkit/core-sdk/android/offline-push.md +0 -361
  334. package/resource/doc/callkit/core-sdk/flutter/answer-call.md +0 -1160
  335. package/resource/doc/callkit/core-sdk/flutter/make-call.md +0 -1205
  336. package/resource/doc/callkit/core-sdk/ios/answer-call.md +0 -1090
  337. package/resource/doc/callkit/core-sdk/ios/make-call.md +0 -1248
  338. package/resource/doc/callkit/core-sdk/ios/offline-push.md +0 -485
  339. package/resource/doc/callkit/core-sdk/uni-app/answer-call.md +0 -950
  340. package/resource/doc/callkit/core-sdk/uni-app/make-call.md +0 -1052
  341. package/resource/doc/callkit/faq/common/error-code.md +0 -47
  342. package/resource/doc/callkit/faq/flutter-faq.md +0 -115
  343. package/resource/doc/callkit/faq/ios-faq.md +0 -115
  344. package/resource/doc/callkit/faq/web-faq.md +0 -36
  345. package/resource/doc/callkit/preset/android/api.md +0 -296
  346. package/resource/doc/callkit/preset/flutter/api.md +0 -410
  347. package/resource/doc/callkit/preset/flutter/integration.md +0 -164
  348. package/resource/doc/callkit/preset/ios/api.md +0 -80
  349. package/resource/doc/callkit/preset/ios/integration.md +0 -187
  350. package/resource/doc/callkit/preset/react/api.md +0 -501
  351. package/resource/doc/callkit/preset/react/integration.md +0 -86
  352. package/resource/doc/callkit/preset/vue/api.md +0 -501
  353. package/resource/doc/callkit/preset/vue/integration.md +0 -83
  354. package/resource/doc/chatkit/android/faq.md +0 -111
  355. package/resource/doc/chatkit/android/features/theme.md +0 -219
  356. package/resource/doc/chatkit/android/integration.md +0 -490
  357. package/resource/doc/chatkit/faq/android_sdk/client-api.md +0 -281
  358. package/resource/doc/chatkit/faq/common/product.md +0 -7
  359. package/resource/doc/chatkit/faq/common/server.md +0 -44
  360. package/resource/doc/chatkit/faq/common/server_error_code.md +0 -74
  361. package/resource/doc/chatkit/faq/flutter_sdk/client-api.md +0 -199
  362. package/resource/doc/chatkit/faq/flutter_sdk/faq.md +0 -53
  363. package/resource/doc/chatkit/faq/ios_sdk/client-api.md +0 -235
  364. package/resource/doc/chatkit/faq/web_sdk/error_code.md +0 -47
  365. package/resource/doc/chatkit/faq/web_sdk/faq.md +0 -287
  366. package/resource/doc/chatkit/flutter/faq.md +0 -23
  367. package/resource/doc/chatkit/flutter/features/theme.md +0 -235
  368. package/resource/doc/chatkit/flutter/integration.md +0 -344
  369. package/resource/doc/chatkit/ios/faq.md +0 -111
  370. package/resource/doc/chatkit/ios/features/theme.md +0 -267
  371. package/resource/doc/chatkit/react/components/avatar.md +0 -104
  372. package/resource/doc/chatkit/react/components/chat-header.md +0 -148
  373. package/resource/doc/chatkit/react/components/chat-setting.md +0 -57
  374. package/resource/doc/chatkit/react/components/chat.md +0 -38
  375. package/resource/doc/chatkit/react/components/component-list.md +0 -37
  376. package/resource/doc/chatkit/react/components/conversation-actions.md +0 -174
  377. package/resource/doc/chatkit/react/components/conversation-list.md +0 -333
  378. package/resource/doc/chatkit/react/components/conversation-preview.md +0 -118
  379. package/resource/doc/chatkit/react/components/conversation-search.md +0 -60
  380. package/resource/doc/chatkit/react/components/message-list.md +0 -293
  381. package/resource/doc/chatkit/react/components/tuikit.md +0 -34
  382. package/resource/doc/chatkit/react/faq.md +0 -26
  383. package/resource/doc/chatkit/react/integration.md +0 -416
  384. package/resource/doc/chatkit/vue/components/avatar.md +0 -104
  385. package/resource/doc/chatkit/vue/components/chat-header.md +0 -148
  386. package/resource/doc/chatkit/vue/components/chat-setting.md +0 -62
  387. package/resource/doc/chatkit/vue/components/chat.md +0 -45
  388. package/resource/doc/chatkit/vue/components/component-list.md +0 -87
  389. package/resource/doc/chatkit/vue/components/contact-list.md +0 -271
  390. package/resource/doc/chatkit/vue/components/conversation-actions.md +0 -228
  391. package/resource/doc/chatkit/vue/components/conversation-list.md +0 -320
  392. package/resource/doc/chatkit/vue/components/conversation-preview.md +0 -213
  393. package/resource/doc/chatkit/vue/components/message-input.md +0 -1054
  394. package/resource/doc/chatkit/vue/components/message-list.md +0 -433
  395. package/resource/doc/chatkit/vue/components/tuikit.md +0 -31
  396. package/resource/doc/chatkit/vue/components/userpicker.md +0 -256
  397. package/resource/doc/chatkit/vue/faq.md +0 -36
  398. package/resource/doc/chatkit/vue/integration.md +0 -428
  399. package/resource/doc/livekit/core-sdk/live/flutter/live-host-interaction.md +0 -866
  400. package/resource/doc/livekit/faq/common/error-code.md +0 -88
  401. package/resource/doc/livekit/preset/live/vue/api-reference/index.md +0 -780
  402. package/resource/doc/livekit/preset/live/vue/components/co-guest-panel.md +0 -91
  403. package/resource/doc/livekit/preset/live/vue/components/live-scene-panel.md +0 -112
  404. package/resource/doc/livekit/preset/live/vue/components/stream-mixer.md +0 -215
  405. package/resource/doc/livekit/preset/live/vue/live-player-h5-integration.md +0 -300
  406. package/resource/doc/roomkit/faq/common/error-code.md +0 -67
  407. package/resource/doc/roomkit/vue/features/call-user-to-room.md +0 -220
  408. package/resource/doc/roomkit/vue/features/device-state.md +0 -460
  409. package/resource/doc/roomkit/vue/features/free-beauty-panel.md +0 -215
  410. package/resource/doc/roomkit/vue/features/room-chat.md +0 -369
  411. package/resource/doc/roomkit/vue/features/room-state.md +0 -282
  412. package/resource/doc/roomkit/vue/features/schedule-room.md +0 -318
  413. package/resource/doc/roomkit/vue/features/screen-share.md +0 -265
  414. package/resource/doc/roomkit/vue/features/virtual-background.md +0 -271
  415. package/resource/doc/roomkit/vue/integration.md +0 -315
  416. package/resource/doc/rtcengine/faq/common/error_code.md +0 -1
  417. package/resource/doc/rtcengine/faq/web_sdk/.gitkeep +0 -0
  418. package/resource/doc/rtcengine/web/.gitkeep +0 -0
  419. package/resource/doc/rtcengine/web/how_to_run_web_sdk_demo.md +0 -59
  420. package/resource/doc/trtc/C++/ITRTCCloud.md +0 -1970
  421. package/resource/doc/trtc/C++/ITRTCStatistics.md +0 -70
  422. package/resource/doc/trtc/C++/ITXAudioEffectManager.md +0 -469
  423. package/resource/doc/trtc/C++/ITXDeviceManager.md +0 -387
  424. package/resource/doc/trtc/C++/TRTCCloudCallback.md +0 -1082
  425. package/resource/doc/trtc/C++/TRTCTypeDef.md +0 -925
  426. package/resource/doc/trtc/C++/TXLiteAVCode.md +0 -129
  427. package/resource/doc/trtc/android/TRTCCloud.md +0 -1815
  428. package/resource/doc/trtc/android/TRTCCloudDef.md +0 -992
  429. package/resource/doc/trtc/android/TRTCCloudListener.md +0 -1004
  430. package/resource/doc/trtc/android/TRTCStatistics.md +0 -65
  431. package/resource/doc/trtc/android/TXAudioEffectManager.md +0 -469
  432. package/resource/doc/trtc/android/TXBeautyManager.md +0 -402
  433. package/resource/doc/trtc/android/TXDeviceManager.md +0 -173
  434. package/resource/doc/trtc/android/TXLiteAVCode.md +0 -127
  435. package/resource/doc/trtc/iOS/TRTCCloud.md +0 -2028
  436. package/resource/doc/trtc/iOS/TRTCCloudDef.md +0 -958
  437. package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +0 -1046
  438. package/resource/doc/trtc/iOS/TRTCStatistics.md +0 -65
  439. package/resource/doc/trtc/iOS/TXAudioEffectManager.md +0 -397
  440. package/resource/doc/trtc/iOS/TXBeautyManager.md +0 -403
  441. package/resource/doc/trtc/iOS/TXDeviceManager.md +0 -381
  442. package/resource/doc/trtc/iOS/TXLiteAVCode.md +0 -130
  443. package/server-config.js.map +0 -1
  444. package/server.js.map +0 -1
  445. package/streamable-http.js.map +0 -1
  446. package/tools/call/get_callkit_api.js +0 -33
  447. package/tools/call/get_callkit_api.js.map +0 -1
  448. package/tools/call/get_native_call_uikit_integration.js.map +0 -1
  449. package/tools/call/get_native_callkit_core_integration.js.map +0 -1
  450. package/tools/call/get_web_call_uikit_integration.js.map +0 -1
  451. package/tools/chat/get_native_chat_uikit_feature_detail.js +0 -35
  452. package/tools/chat/get_native_chat_uikit_feature_detail.js.map +0 -1
  453. package/tools/chat/get_native_chat_uikit_integration.js.map +0 -1
  454. package/tools/chat/get_web_chat_uikit_component_detail.js +0 -35
  455. package/tools/chat/get_web_chat_uikit_component_detail.js.map +0 -1
  456. package/tools/chat/get_web_chat_uikit_integration.js.map +0 -1
  457. package/tools/common/get_faq.js +0 -266
  458. package/tools/common/get_faq.js.map +0 -1
  459. package/tools/common/get_usersig.js.map +0 -1
  460. package/tools/common/present_framework_choice.js.map +0 -1
  461. package/tools/common/record_answer.js.map +0 -1
  462. package/tools/common/record_feedback.js.map +0 -1
  463. package/tools/common/record_skill_session.js +0 -69
  464. package/tools/common/record_skill_session.js.map +0 -1
  465. package/tools/definitions/get_callkit_api_def.js +0 -29
  466. package/tools/definitions/get_callkit_api_def.js.map +0 -1
  467. package/tools/definitions/get_faq_def.js +0 -47
  468. package/tools/definitions/get_faq_def.js.map +0 -1
  469. package/tools/definitions/get_native_call_uikit_integration_def.js.map +0 -1
  470. package/tools/definitions/get_native_callkit_core_integration_def.js.map +0 -1
  471. package/tools/definitions/get_native_chat_uikit_feature_detail_def.js +0 -31
  472. package/tools/definitions/get_native_chat_uikit_feature_detail_def.js.map +0 -1
  473. package/tools/definitions/get_native_chat_uikit_integration_def.js.map +0 -1
  474. package/tools/definitions/get_native_livekit_core_features_def.js +0 -34
  475. package/tools/definitions/get_native_livekit_core_features_def.js.map +0 -1
  476. package/tools/definitions/get_native_livekit_core_integration_def.js.map +0 -1
  477. package/tools/definitions/get_native_trtc_sdk_docs_def.js +0 -32
  478. package/tools/definitions/get_native_trtc_sdk_docs_def.js.map +0 -1
  479. package/tools/definitions/get_usersig_def.js.map +0 -1
  480. package/tools/definitions/get_web_call_uikit_integration_def.js.map +0 -1
  481. package/tools/definitions/get_web_chat_uikit_component_detail_def.js +0 -31
  482. package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +0 -1
  483. package/tools/definitions/get_web_chat_uikit_integration_def.js.map +0 -1
  484. package/tools/definitions/get_web_live_uikit_integration_def.js.map +0 -1
  485. package/tools/definitions/get_web_livekit_api_def.js +0 -30
  486. package/tools/definitions/get_web_livekit_api_def.js.map +0 -1
  487. package/tools/definitions/get_web_livekit_component_detail_def.js +0 -32
  488. package/tools/definitions/get_web_livekit_component_detail_def.js.map +0 -1
  489. package/tools/definitions/get_web_room_uikit_integration_def.js.map +0 -1
  490. package/tools/definitions/get_web_roomkit_feature_detail_def.js +0 -31
  491. package/tools/definitions/get_web_roomkit_feature_detail_def.js.map +0 -1
  492. package/tools/definitions/get_web_trtc_sdk_api_def.js +0 -27
  493. package/tools/definitions/get_web_trtc_sdk_api_def.js.map +0 -1
  494. package/tools/definitions/get_web_trtc_sdk_integration_def.js +0 -27
  495. package/tools/definitions/get_web_trtc_sdk_integration_def.js.map +0 -1
  496. package/tools/definitions/get_web_trtc_sdk_plugin_def.js +0 -27
  497. package/tools/definitions/get_web_trtc_sdk_plugin_def.js.map +0 -1
  498. package/tools/definitions/present_framework_choice_def.js.map +0 -1
  499. package/tools/definitions/record_answer_def.js.map +0 -1
  500. package/tools/definitions/record_feedback_def.js.map +0 -1
  501. package/tools/definitions/record_skill_session_def.js +0 -31
  502. package/tools/definitions/record_skill_session_def.js.map +0 -1
  503. package/tools/index.js.map +0 -1
  504. package/tools/live/get_native_livekit_core_features.js +0 -68
  505. package/tools/live/get_native_livekit_core_features.js.map +0 -1
  506. package/tools/live/get_native_livekit_core_integration.js.map +0 -1
  507. package/tools/live/get_web_live_uikit_integration.js.map +0 -1
  508. package/tools/live/get_web_livekit_api.js +0 -33
  509. package/tools/live/get_web_livekit_api.js.map +0 -1
  510. package/tools/live/get_web_livekit_component_detail.js +0 -35
  511. package/tools/live/get_web_livekit_component_detail.js.map +0 -1
  512. package/tools/room/get_web_room_uikit_integration.js.map +0 -1
  513. package/tools/room/get_web_roomkit_feature_detail.js +0 -69
  514. package/tools/room/get_web_roomkit_feature_detail.js.map +0 -1
  515. package/tools/rtcengine/get_web_trtc_sdk_api.js +0 -32
  516. package/tools/rtcengine/get_web_trtc_sdk_api.js.map +0 -1
  517. package/tools/rtcengine/get_web_trtc_sdk_integration.js +0 -32
  518. package/tools/rtcengine/get_web_trtc_sdk_integration.js.map +0 -1
  519. package/tools/rtcengine/get_web_trtc_sdk_plugin.js +0 -32
  520. package/tools/rtcengine/get_web_trtc_sdk_plugin.js.map +0 -1
  521. package/tools/trtc/get_native_trtc_sdk_docs.js +0 -74
  522. package/tools/trtc/get_native_trtc_sdk_docs.js.map +0 -1
  523. package/utils/build-session-directives.js +0 -120
  524. package/utils/build-session-directives.js.map +0 -1
  525. package/utils/generate-structured-result.js.map +0 -1
  526. package/utils/generate-usersig.js.map +0 -1
  527. package/utils/get-device-identifier.js.map +0 -1
  528. package/utils/get-doc-content.js.map +0 -1
  529. package/utils/handle-framework.js +0 -9
  530. package/utils/handle-framework.js.map +0 -1
  531. package/utils/handle-state-name.js +0 -29
  532. package/utils/handle-state-name.js.map +0 -1
  533. package/utils/http-get.js.map +0 -1
  534. package/utils/http-post.js.map +0 -1
  535. package/utils/report-cls-client.js.map +0 -1
  536. package/utils/report-es-client.js.map +0 -1
  537. package/utils/report-runtime-error-cls-client.js +0 -91
  538. package/utils/report-runtime-error-cls-client.js.map +0 -1
  539. /package/resource/{doc/livekit/preset/live/vue/faq.md → knowledge/push/config/donut.md} +0 -0
  540. /package/resource/{doc/roomkit/vue/faq.md → knowledge/push/integration/donut.md} +0 -0
  541. /package/resource/{doc → knowledge}/rtcengine/web/api.md +0 -0
  542. /package/resource/{doc/rtcengine/faq/web/web.md → knowledge/rtcengine/web/faq.md} +0 -0
  543. /package/resource/{doc → knowledge}/rtcengine/web/how_to_integrated_web_sdk.md +0 -0
  544. /package/resource/{doc → knowledge}/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +0 -0
  545. /package/resource/{doc → knowledge}/rtcengine/web/plugin/28-advanced-beauty.md +0 -0
  546. /package/resource/{doc → knowledge}/rtcengine/web/plugin/30-advanced-cross-room-link.md +0 -0
  547. /package/resource/{doc → knowledge}/rtcengine/web/plugin/36-advanced-virtual-background.md +0 -0
  548. /package/resource/{doc → knowledge}/rtcengine/web/plugin/37-advanced-voice-changer.md +0 -0
  549. /package/resource/{doc → knowledge}/rtcengine/web/plugin/39-advanced-video-decoder.md +0 -0
  550. /package/resource/{doc → knowledge}/rtcengine/web/plugin/40-advanced-video-mixer.md +0 -0
  551. /package/resource/{doc → knowledge}/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +0 -0
  552. /package/resource/{doc → knowledge}/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +0 -0
  553. /package/resource/{doc → knowledge}/rtcengine/web/plugin/43-advanced-face-detection.md +0 -0
@@ -0,0 +1,828 @@
1
+ This guide walks you through implementing the "answer call" feature using the **AtomicXCore SDK**, leveraging its **DeviceStore**, **CallStore**, and the core UI component **CallCoreView**.
2
+
3
+ ## Core Features
4
+
5
+ To build multi-party audio/video call features with **AtomicXCore**, you’ll use the following core modules:
6
+
7
+ |**Module**|**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)|Core call view component. Automatically observes CallStore data and renders video, while supporting UI customization such as layout switching, avatar and icon configuration.|
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: initiate, answer, reject, hang up. Provides real-time access to participant audio/video status, call timer, call records, 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
+ ## Getting Started
14
+
15
+ ### Step 1: Activate the Service
16
+
17
+ Go to Activate the Service to obtain either the trial or paid version of the SDK.
18
+
19
+ ### Step 2: Integrate the SDK
20
+
21
+ **Install Components:** Add `api "io.trtc.uikit:atomicx-core:latest.release"` and `api "com.tencent.imsdk:imsdk-plus:8.7.7201"` to your **build.gradle** file, then run **Gradle Sync**.
22
+ ``` javascript
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 the call service, initialize CallStore and log in the user in sequence. CallStore will automatically sync user information after a successful login, entering 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
+
44
+ LoginStore.shared.login(
45
+ this,
46
+ sdkAppId,
47
+ userId,
48
+ userSig,
49
+ object : CompletionHandler {
50
+ override fun onSuccess() {
51
+ // Complete TUICallEngine initialization
52
+ TUICallEngine.createInstance(context).init(GenerateTestUserSig.SDKAPPID, userId, userSig, null)
53
+ // Handle login success
54
+ Log.d("Login", "login success");
55
+ }
56
+
57
+ override fun onFailure(code: Int, desc: String) {
58
+ // Handle login failure
59
+ Log.e("Login", "login failed, code: $code, error: $desc");
60
+ }
61
+ }
62
+ )
63
+ }
64
+ }
65
+ ```
66
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Description</strong> |
67
+ | --- | --- | --- |
68
+ | userId | String | Unique identifier for the current user. Only English letters, numbers, hyphens, and underscores are allowed. Avoid simple IDs (e.g., 1, 123) to prevent multi-device login conflicts. |
69
+ | sdkAppId | int | Obtain from the <a href="https://trtc.io/login?fro=gt&s_url=https%3A%2F%2Fconsole.trtc.io%2F">Console</a>. |
70
+ | userSig | String | Authentication token for TRTC.<br>- Development: Use <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> or <a href="https://trtc.io/login?s_url=https://console.trtc.io/usersig">UserSig Tool</a> to generate a temporary UserSig.<br>- Production: Always generate UserSig server-side to prevent secret key leakage. See Server-side UserSig Generation for details. For more info, see How to Calculate and Use UserSig. |
71
+
72
+ ## Implement Call Answering
73
+
74
+ **Ensure the user is logged in before answering calls**. Follow these 6 steps to answer incoming calls:
75
+
76
+ ### Step 1: Create Call Page
77
+
78
+ Create a call page that launches when an incoming call is received.
79
+ 1. **Create the call page:** Implement a new Activity to serve as the call interface, triggered upon incoming call.
80
+
81
+ 2. **Bind the call page to **[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 CallCoreView component automatically observes [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) data and renders video, supporting UI customization like layout switching, avatar, and icon configuration.
82
+
83
+ ``` java
84
+ import io.trtc.tuikit.atomicxcore.api.view.CallCoreView
85
+
86
+ class CallActivity : AppCompatActivity() {
87
+ private var callCoreView: CallCoreView? = null
88
+
89
+ // 1. Create the call page container
90
+ override fun onCreate(savedInstanceState: Bundle?) {
91
+ super.onCreate(savedInstanceState)
92
+ // 2. Bind CallCoreView to the call page
93
+ callCoreView = CallCoreView(this)
94
+ setContentView(callCoreView)
95
+ }
96
+ }
97
+ ```
98
+
99
+ **CallCoreView Component Features:**
100
+
101
+ |**Feature**|**Description**|**Reference**|
102
+ |---------|---------|---------|
103
+ |**Set Layout Mode**|Switches layout modes flexibly. If not set, adapts layout automatically based on participant count.|Layout mode switching|
104
+ |**Set Avatar**|Allows custom avatars for users by providing avatar resource paths.|Custom default avatar|
105
+ |**Set Volume Indicator Icon**|Supports custom volume indicator icons for different volume levels.|Custom volume indicator icon|
106
+ |**Set Network Indicator Icon**|Configures network status indicator icons based on real-time network quality.|Custom network indicator icon|
107
+ |**Set Waiting Animation for Users**|In multi-party calls, supports GIF animations for users waiting to answer.|Custom loading animation|
108
+
109
+ ### Step 2: Add Answer and Reject Buttons
110
+
111
+ Use [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) APIs to customize your buttons.
112
+ - **DeviceStore:** Controls microphone (toggle/volume), camera (toggle/switch/quality), screen sharing, and monitors device status. Bind methods to button click events and update UI in real time by observing device status changes.
113
+
114
+ - **CallStore:** Provides core call controls (answer, hang up, reject). Bind methods to button click events and observe call status to keep button visibility in sync with the call phase.
115
+
116
+ - **Icon Resources:** Download button icons from [GitHub](https://github.com/Tencent-RTC/TUIKit_Android/tree/main/call/tuicallkit-kt/src/main/res). These icons are designed for TUICallKit and are copyright-free.
117
+
118
+ |**Icons**|||||||||
119
+ |---------|---------|---------|---------|---------|---------|---------|---------|---------|
120
+
121
+ - **Implementation for adding "Answer" and "Reject" buttons:**
122
+
123
+ 1. **Add Answer and Reject Buttons:** Create a bottom button bar container and add "Answer" and "Reject" buttons, binding their click events to the [accept](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/accept.html) and [reject](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/reject.html) methods.
124
+
125
+ ``` java
126
+ import io.trtc.tuikit.atomicxcore.api.device.DeviceStore
127
+ import io.trtc.tuikit.atomicxcore.api.call.CallStore
128
+
129
+ class CallActivity : AppCompatActivity() {
130
+ private var buttonContainer: LinearLayout? = null
131
+ private var buttonAccept: Button? = null
132
+ private var buttonReject: Button? = null
133
+
134
+ override fun onCreate(savedInstanceState: Bundle?) {
135
+ super.onCreate(savedInstanceState)
136
+ // 1. Create the bottom button bar container
137
+ createButtonContainer()
138
+ // 2. Add "Answer" and "Reject" buttons
139
+ addRejectAndAcceptButtons()
140
+
141
+ setContentView(buttonContainer)
142
+ }
143
+
144
+ // Create the bottom button bar container
145
+ private fun createButtonContainer() {
146
+ buttonContainer = LinearLayout(this).apply {
147
+ orientation = LinearLayout.HORIZONTAL
148
+ gravity = Gravity.CENTER
149
+ layoutParams = FrameLayout.LayoutParams(
150
+ FrameLayout.LayoutParams.MATCH_PARENT,
151
+ FrameLayout.LayoutParams.WRAP_CONTENT
152
+ ).apply {
153
+ gravity = Gravity.BOTTOM
154
+ bottomMargin = dpToPx(80)
155
+ }
156
+ }
157
+ }
158
+
159
+ // Add "Answer" and "Reject" buttons
160
+ private fun addRejectAndAcceptButtons() {
161
+ createAcceptButton()
162
+ createRejectButton()
163
+ buttonContainer?.addView(buttonAccept)
164
+ buttonContainer?.addView(buttonReject)
165
+ }
166
+
167
+ // Create the Answer button
168
+ private fun createAcceptButton() {
169
+ buttonAccept = Button(this).apply {
170
+ text = "Answer"
171
+ layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f).apply {
172
+ marginEnd = dpToPx(8)
173
+ }
174
+ setOnClickListener {
175
+ // 3. Bind accept to Answer button click event
176
+ CallStore.shared.accept(null)
177
+ }
178
+ }
179
+ }
180
+
181
+ // Create the Reject button
182
+ private fun createRejectButton() {
183
+ buttonReject = Button(this).apply {
184
+ text = "Reject"
185
+ layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f).apply {
186
+ marginStart = dpToPx(8)
187
+ }
188
+ setOnClickListener {
189
+ // 3. Bind reject to Reject button click event
190
+ CallStore.shared.reject(null)
191
+ }
192
+ }
193
+ }
194
+ }
195
+ ```
196
+ 2. **Destroy the interface when the caller cancels or you reject:** If the caller cancels or the callee rejects, 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) event is triggered. Listen for this event to promptly close (destroy) the call interface when the call ends.
197
+
198
+ ``` java
199
+ import io.trtc.tuikit.atomicxcore.api.call.CallEndReason
200
+ import io.trtc.tuikit.atomicxcore.api.call.CallListener
201
+ import io.trtc.tuikit.atomicxcore.api.call.CallMediaType
202
+ import io.trtc.tuikit.atomicxcore.api.call.CallStore
203
+
204
+ class CallActivity : AppCompatActivity() {
205
+
206
+ private var callListener: CallListener? = null
207
+
208
+ override fun onCreate(savedInstanceState: Bundle?) {
209
+ super.onCreate(savedInstanceState)
210
+ // ... other initialization code
211
+
212
+ // 1. Listen for call ended events
213
+ addListener()
214
+ }
215
+
216
+ private fun addListener() {
217
+ callListener = object : CallListener() {
218
+ override fun onCallEnded(callId: String, mediaType: CallMediaType, reason: CallEndReason, userId: String) {
219
+ // 2. Close the page when the call ends
220
+ finish()
221
+ }
222
+ }
223
+ callListener?.let { CallStore.shared.addListener(it) }
224
+ }
225
+ }
226
+ ```
227
+
228
+ **onCallEnded Event Parameters:**
229
+
230
+ |**Parameter**|**Type**|**Description**|
231
+ |---------|---------|---------|
232
+ |callId|String|Unique identifier for this call.|
233
+ |mediaType|[CallMediaType](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)|Specifies whether it's an audio or video call. - `CallMediaType.Video`: Video call. - `CallMediaType.Audio`: Audio call.|
234
+ |reason|[CallEndReason](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)|Reason for call ending. - `Unknown`: Unknown reason. - `Hangup`: User hung up. - `Reject`: Callee rejected. - `NoResponse`: Callee did not answer in time. - `Offline`: Other party offline. - `LineBusy`: Other party busy. - `Canceled`: Caller canceled before callee answered. - `OtherDeviceAccepted`: Answered on another device. - `OtherDeviceReject`: Rejected on another device. - `EndByServer`: Ended by server.|
235
+ |userId|String|User ID that triggered the end.|
236
+
237
+ ### Step 3: Request Audio/Video Permissions
238
+
239
+ Check audio/video permissions before connecting the call. If permissions are missing, prompt the user to grant them dynamically.
240
+ 1. **Declare permissions:** Add camera and microphone permissions in your `AndroidManifest.xml`.
241
+
242
+ ``` java
243
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
244
+ <!-- Microphone permission -->
245
+ <uses-permission android:name="android.permission.RECORD_AUDIO" />
246
+ <!-- Camera permission -->
247
+ <uses-permission android:name="android.permission.CAMERA" />
248
+
249
+ <application>
250
+ <!-- ... -->
251
+ <activity
252
+ android:name=".CallActivity"
253
+ android:exported="false"
254
+ android:screenOrientation="portrait" />
255
+ </application>
256
+ </manifest>
257
+ ```
258
+ 2. **Request permissions dynamically:** Request audio/video permissions when an incoming call is received or as needed in your app logic.
259
+
260
+ ``` java
261
+ // Dynamically request permissions
262
+ private fun requestAllCallPermissions() {
263
+ val allPermissions = arrayOf(
264
+ Manifest.permission.CAMERA,
265
+ Manifest.permission.RECORD_AUDIO
266
+ )
267
+
268
+ if (!checkPermissions(allPermissions)) {
269
+ ActivityCompat.requestPermissions(this, allPermissions, PERMISSION_REQUEST_CODE)
270
+ }
271
+ }
272
+
273
+ // Handle permission request result
274
+ override fun onRequestPermissionsResult(
275
+ requestCode: Int,
276
+ permissions: Array<out String>,
277
+ grantResults: IntArray
278
+ ) {
279
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults)
280
+
281
+ if (requestCode == PERMISSION_REQUEST_CODE) {
282
+ // Check if all permissions are granted
283
+ var allGranted = true
284
+ for (result in grantResults) {
285
+ if (result != PackageManager.PERMISSION_GRANTED) {
286
+ allGranted = false
287
+ break
288
+ }
289
+ }
290
+ if (allGranted) {
291
+ Log.d("MainActivity", "Permission granted")
292
+ } else {
293
+ Log.w("MainActivity", "Some permissions denied")
294
+ }
295
+ }
296
+ }
297
+ ```
298
+
299
+ ### Step 4: Incoming Call Notification
300
+
301
+ Monitor the user's call status and play a ringtone or vibration when an incoming call arrives. Stop the notification after the call is answered or hung up.
302
+ 1. **Subscribe to data layer:** Listen to `CallStore.observerState.selfInfo` for the current user's status.
303
+
304
+ 2. **Play/stop notification:** If `SelfInfo.Status` is `CallParticipantStatus.Waiting`, play ringtone/vibration. If status is `CallParticipantStatus.Accept`, stop the notification.
305
+
306
+ ``` java
307
+ import kotlinx.coroutines.CoroutineScope
308
+ import kotlinx.coroutines.Dispatchers
309
+ import kotlinx.coroutines.Job
310
+ import kotlinx.coroutines.launch
311
+
312
+ class MainActivity : AppCompatActivity() {
313
+ private var stateJob: Job? = null
314
+
315
+ override fun onCreate(savedInstanceState: Bundle?) {
316
+ super.onCreate(savedInstanceState)
317
+ // 1. Monitor current user's call status
318
+ observeSelfStatus()
319
+ }
320
+
321
+ // Monitor current user's call status
322
+ private fun observeSelfStatus() {
323
+ stateJob = CoroutineScope(Dispatchers.Main).launch {
324
+ CallStore.shared.observerState.selfInfo.collect { selfInfo ->
325
+ // 2. Play/stop incoming call notification
326
+ if (selfInfo.status == CallParticipantStatus.Waiting) {
327
+ // Start playing incoming call notification
328
+ }
329
+ if (selfInfo.status == CallParticipantStatus.Accept) {
330
+ // Stop playing incoming call notification
331
+ }
332
+ }
333
+ }
334
+ }
335
+ }
336
+ ```
337
+
338
+ ### Step 5: Open Media Devices on Incoming Call
339
+
340
+ When an incoming call is received, use the [onCallReceived](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-received.html) event to determine the media type. For a better experience, pre-open the relevant devices when the call interface is triggered.
341
+ 1. **Listen for incoming call event:** Subscribe to the `onCallReceived` event.
342
+
343
+ 2. **Open devices based on media type:** For audio calls, open the microphone. For video calls, open both microphone and camera.
344
+
345
+ ``` java
346
+ import io.trtc.tuikit.atomicxcore.api.device.DeviceStore
347
+ import io.trtc.tuikit.atomicxcore.api.call.CallMediaType
348
+ import io.trtc.tuikit.atomicxcore.api.call.*
349
+
350
+ class MainActivity : AppCompatActivity() {
351
+ private var callListener: CallListener? = null
352
+
353
+ override fun onCreate(savedInstanceState: Bundle?) {
354
+ super.onCreate(savedInstanceState)
355
+ // ... other initialization code
356
+
357
+ // 1. Listen for incoming call event
358
+ addListener()
359
+ }
360
+
361
+ private fun addListener() {
362
+ callListener = object : CallListener() {
363
+ override fun onCallReceived(callId: String, mediaType: CallMediaType, userData: String) {
364
+ super.onCallReceived(callId, mediaType, userData)
365
+ // 2. Open devices based on media type
366
+ openDeviceForMediaType(mediaType)
367
+ }
368
+ }
369
+ callListener?.let { CallStore.shared.addListener(it) }
370
+ }
371
+
372
+ private fun openDeviceForMediaType(mediaType: CallMediaType?) {
373
+ mediaType?.let {
374
+ DeviceStore.shared().openLocalMicrophone(null)
375
+ if (mediaType == CallMediaType.Video) {
376
+ val isFrontCamera = true
377
+ DeviceStore.shared().openLocalCamera(isFrontCamera, null)
378
+ }
379
+ }
380
+ }
381
+ }
382
+ ```
383
+
384
+ **onCallReceived Event Parameters:**
385
+
386
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Description</strong> |
387
+ | --- | --- | --- |
388
+ | callId | String | Unique identifier for this call. |
389
+ | 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> | Specifies whether it's an audio or video call.<br>- <code>CallMediaType.Video</code>: Video call.<br>- <code>CallMediaType.Audio</code>: Audio call. |
390
+
391
+ **openLocalCamera API Parameters:**
392
+
393
+ | <strong>Parameter Name</strong> | <strong>Type</strong> | <strong>Required</strong> | <strong>Description</strong> |
394
+ | --- | --- | --- | --- |
395
+ | isFront | Boolean | Yes | Whether to open the front camera.<br>- <code>true</code>: Open front camera.<br>- <code>false</code>: Open rear camera. |
396
+ | completion | CompletionHandler | No | Callback for operation result; returns error code/message if failed. |
397
+
398
+ **openLocalMicrophone API Parameters:**
399
+
400
+ |**Parameter Name**|**Type**|**Required**|**Description**|
401
+ |---------|---------|---------|---------|
402
+ |completion|CompletionHandler|No|Callback for operation result; returns error code/message if failed.|
403
+
404
+ ### Step 6: Trigger Call Interface on Incoming Call
405
+
406
+ Since you already subscribed to the [onCallReceived](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-received.html) event in Step 5, launch the call page in this event:
407
+ ``` java
408
+ private fun addListener() {
409
+ callListener = object : CallListener() {
410
+ override fun onCallReceived(callId: String, mediaType: CallMediaType, userData: String) {
411
+ super.onCallReceived(callId, mediaType, userData)
412
+ // Trigger call page
413
+ val intent = Intent(this@MainActivity, CallActivity::class.java)
414
+ startActivity(intent)
415
+ }
416
+ }
417
+ callListener?.let { CallStore.shared.addListener(it) }
418
+ }
419
+ ```
420
+
421
+ ### Demo Effect
422
+
423
+ After completing the above 6 steps, your app may look like this:
424
+
425
+ ## Customize Pages
426
+
427
+ [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) supports extensive UI customization, including flexible avatar and volume indicator icon replacement. Download these icons directly from [GitHub](https://github.com/Tencent-RTC/TUIKit_Android/tree/main/call/tuicallkit-kt/src/main/res). All icons are designed for TUICallKit and are copyright-free.
428
+
429
+ ### Custom Volume Indicator Icons
430
+
431
+ 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 in [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) to set custom volume indicator icons.
432
+
433
+ - **setVolumeLevelIcons Sample Code:**
434
+
435
+ ``` java
436
+ private fun setIconResourcePath() {
437
+ val volumeLevelIcons = mapOf(VolumeLevel.Mute to "icon resource path")
438
+ val callCoreView = CallCoreView(context)
439
+ callCoreView.setVolumeLevelIcons(volumeLevelIcons)
440
+ }
441
+ ```
442
+ - **setVolumeLevelIcons API Parameters:**
443
+
444
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Required</strong> | <strong>Description</strong> |
445
+ | --- | --- | --- | --- |
446
+ | icons | Map | Yes | Mapping of volume levels to icon resources. 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): Icon resource path. |
447
+
448
+ - **Volume Indicator Icons:**
449
+
450
+ |**Icon**|**Description**|
451
+ |---------|---------|
452
+ ||Volume indicator icon. Recommended for `VolumeLevel.Low` or `VolumeLevel.Medium`.|
453
+ ||Mute icon. Recommended for `VolumeLevel.Mute`.|
454
+
455
+ ### Custom Network Indicator Icons
456
+
457
+ Use the [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) method in [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) to set custom network status icons.
458
+
459
+ - **setNetworkQualityIcons Sample Code:**
460
+
461
+ ``` java
462
+ private fun setNetworkQualityIcons() {
463
+ val volumeLevelIcons = mapOf(NetworkQuality.BAD to "icon path")
464
+ val callCoreView = CallCoreView(context)
465
+ callCoreView.setNetworkQualityIcons(volumeLevelIcons)
466
+ }
467
+ ```
468
+ - **setNetworkQualityIcons API Parameters:**
469
+
470
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Required</strong> | <strong>Description</strong> |
471
+ | --- | --- | --- | --- |
472
+ | icons | Map | Yes | Mapping of network quality levels to icon resources. 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): Icon resource path. |
473
+
474
+ - **Poor Network Indicator Icon:**
475
+
476
+ |**Icon**|**Description**|
477
+ |---------|---------|
478
+ ||Poor network indicator icon. Recommended for `NetworkQuality.BAD`, `NetworkQuality.VERY_BAD`, or `NetworkQuality.DOWN`.|
479
+
480
+ ### Custom Default Avatar
481
+
482
+ Use the [setParticipantAvatars](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-participant-avatars.html) method in [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) to set user avatars. Listen to [allParticipants](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/all-participants.html) in CallStore: set and display avatars when available; show the default avatar if unavailable or failed to load.
483
+ - **setParticipantAvatars Sample Code:**
484
+
485
+ ``` java
486
+ private fun setParticipantAvatars() {
487
+ val avatars: MutableMap<String, ParticipantAvatarInfo> = mutableMapOf()
488
+ val userId = "" // User ID
489
+ val avatarPath = "" // Default avatar resource path
490
+ avatars[userId] = avatarPath
491
+ val callCoreView = CallCoreView(context)
492
+ callCoreView.setParticipantAvatars(avatars)
493
+ }
494
+ ```
495
+ - **setParticipantAvatars API Parameters:**
496
+
497
+ |**Parameter**|**Type**|**Required**|**Description**|
498
+ |---------|---------|---------|---------|
499
+ |icons|Map|Yes|Mapping of user IDs to avatar resource paths. - Key: userID. - Value: Absolute path to avatar resource.|
500
+
501
+ - **Default Avatar Resource:**
502
+
503
+ |**Icon**|**Description**|
504
+ |---------|---------|
505
+ ||Default avatar. Recommended when user avatar is missing or fails to load.|
506
+
507
+ ### Custom Loading Animation
508
+
509
+ Use the [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) method in [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) to set custom waiting animations for users.
510
+
511
+ - **setWaitingAnimation Sample Code:**
512
+
513
+ ``` java
514
+ private fun setWaitingAnimation() {
515
+ val waitingAnimationPath = "" // Path to the waiting animation GIF resource
516
+ val callCoreView = CallCoreView(context)
517
+ callCoreView.setWaitingAnimation(waitingAnimationPath)
518
+ }
519
+ ```
520
+ - **setWaitingAnimation API Parameters:**
521
+
522
+ |**Parameter**|**Type**|**Required**|**Description**|
523
+ |---------|---------|---------|---------|
524
+ |path|String|Yes|Absolute path to the GIF resource.|
525
+
526
+ - **Waiting Animation:**
527
+
528
+ |**Icon**|**Description**|
529
+ |---------|---------|
530
+ ||Waiting animation for users. Recommended for group calls when user status is waiting to answer.|
531
+
532
+ ### Add Call Timer
533
+
534
+ Get call duration in real time from the `duration` field in [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).
535
+ 1. **Subscribe to data layer:** Listen to `CallStore.observerState.activeCall` for the current active call.
536
+
537
+ 2. **Bind call timer data:** Bind `activeCall.duration` to your UI control. This field updates reactively—no need to manually manage a timer.
538
+
539
+ ``` java
540
+ import android.content.Context
541
+ import androidx.appcompat.widget.AppCompatTextView
542
+ import androidx.core.content.ContextCompat
543
+ import com.tencent.qcloud.tuicore.util.DateTimeUtil
544
+ import io.trtc.tuikit.atomicx.R
545
+ import io.trtc.tuikit.atomicxcore.api.call.CallStore
546
+ import io.trtc.tuikit.atomicxcore.api.call.CallParticipantStatus
547
+ import kotlinx.coroutines.CoroutineScope
548
+ import kotlinx.coroutines.Dispatchers
549
+ import kotlinx.coroutines.Job
550
+ import kotlinx.coroutines.launch
551
+
552
+ class TimerView(context: Context) : AppCompatTextView(context) {
553
+ private var subscribeStateJob: Job? = null
554
+
555
+ override fun onAttachedToWindow() {
556
+ super.onAttachedToWindow()
557
+ // 1. Subscribe to activeCall in the data layer
558
+ registerActiveCallObserver()
559
+ }
560
+
561
+ override fun onDetachedFromWindow() {
562
+ super.onDetachedFromWindow()
563
+ subscribeStateJob?.cancel()
564
+ }
565
+
566
+ private fun registerActiveCallObserver() {
567
+ subscribeStateJob = CoroutineScope(Dispatchers.Main).launch {
568
+ CallStore.shared.observerState.activeCall.collect { activeCall ->
569
+ // 2. Bind call timer data, update call duration
570
+ updateDurationView(activeCall)
571
+ }
572
+ }
573
+ }
574
+
575
+ private fun updateDurationView(activeCall: CallInfo) {
576
+ val currentDuration = activeCall.duration
577
+ text = DateTimeUtil.formatSecondsTo00(currentDuration.toInt())
578
+ }
579
+ }
580
+ ```
581
+
582
+ > **Note:**
583
+ >
584
+
585
+ > For more info on reactive call state 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).
586
+ >
587
+
588
+ ## More Features
589
+
590
+ ### Set Avatar and Nickname
591
+
592
+ Before starting a call, 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.
593
+ - **setSelfInfo Sample Code:**
594
+
595
+ ``` java
596
+ val user = UserProfile()
597
+ user.userID = "" // Your userId
598
+ user.avatarURL = "" // Avatar url
599
+ user.nickname = "" // Nickname to set
600
+ LoginStore.shared.setSelfInfo(user, object : CompletionHandler {
601
+ override fun onSuccess() {
602
+ // Success callback
603
+ }
604
+
605
+ override fun onFailure(code: Int, desc: String) {
606
+ // Failure callback
607
+ }
608
+ })
609
+ ```
610
+ - **setSelfInfo API Parameters:**
611
+
612
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Required</strong> | <strong>Description</strong> |
613
+ | --- | --- | --- | --- |
614
+ | 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 information struct.<br>- <code>userID</code> (String): User ID.<br>- <code>avatarURL</code> (String): Avatar URL.<br>- <code>nickname</code> (String): User nickname. 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. |
615
+ | completion | CompletionHandler | No | Callback for operation result. |
616
+
617
+ ### Switch Layout Modes
618
+
619
+ 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 layout modes. If not set, CallCoreView adapts automatically: **Float** mode for 1v1 calls, **Grid** mode for multi-party calls.
620
+ | <strong>Float Mode</strong> | <strong>Grid Mode</strong> | <strong>PIP Mode</strong> |
621
+ | --- | --- | --- |
622
+ | | | |
623
+ | - <strong>Layout Logic:</strong> Full screen shows own video while waiting; after answering, full screen shows the other party's video, own video floats as a small window.<br>- <strong>Interaction:</strong> Supports dragging and swapping windows. | - <strong>Layout Logic:</strong> All participant videos are tiled in a grid. Suitable for 2+ participants; supports click-to-enlarge.<br>- <strong>Interaction:</strong> Click to enlarge a participant's video. | - <strong>Layout Logic:</strong> In 1v1, always shows the other party's video; in multi-party, uses active speaker strategy.<br>- <strong>Interaction:</strong> Shows own video while waiting, displays call timer after answering. |
624
+
625
+ - **setLayoutTemplate Sample Code:**
626
+
627
+ ``` java
628
+ private fun setLayoutTemplate() {
629
+ val callCoreView = CallCoreView()
630
+ val template = CallLayoutTemplate.Grid
631
+ // Set layout mode
632
+ callCoreView.setLayoutTemplate(template)
633
+ setContentView(callCoreView)
634
+ }
635
+ ```
636
+ - **setLayoutTemplate API Parameters:**
637
+
638
+ | <strong>Parameter</strong> | <strong>Type</strong> | <strong>Required</strong> | <strong>Description</strong> |
639
+ | --- | --- | --- | --- |
640
+ | 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's layout mode<br>- <code>CallLayoutTemplate.float</code> :<br>- <strong>Layout:</strong> While waiting, display your own video full screen. After answering, show the remote video full screen and your own video as a floating window.<br>- <strong>Interaction:</strong> Drag the small window or tap to swap big/small video.<br>- <code>CallLayoutTemplate.grid</code> :<br>- <strong>Layout:</strong> All participant videos are tiled in a grid. Best for 2+ participants. Tap to enlarge a video.<br>- <strong>Interaction:</strong> Tap a participant to enlarge their video.<br>- <code>CallLayoutTemplate.pip</code> :<br>- <strong>Layout:</strong> In 1v1, remote video is fixed; in multi-party, the active speaker is shown full screen.<br>- <strong>Interaction:</strong> Shows your own video while waiting, displays call timer after answering. |
641
+
642
+ ### Entering Picture-in-Picture Mode
643
+
644
+ Implementing Picture-in-Picture (PiP) mode requires Android 8.0 (API level 26) or higher. For an optimal user experience, it is recommended to switch your layout to a PiP template when entering this mode.
645
+ - **Entering Picture-in-Picture Mode :** To initiate PiP, call the system method `enterPictureInPictureMode`.
646
+
647
+ ``` java
648
+ private fun enterPictureInPictureModeWithBuild() {
649
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && hasPipModePermission()) {
650
+ val pictureInPictureParams: PictureInPictureParams.Builder = PictureInPictureParams.Builder()
651
+ val floatViewWidth = resources.getDimensionPixelSize(R.dimen.callkit_video_small_view_width)
652
+ val floatViewHeight = resources.getDimensionPixelSize(R.dimen.callkit_video_small_view_height)
653
+ val aspectRatio = Rational(floatViewWidth, floatViewHeight)
654
+ pictureInPictureParams.setAspectRatio(aspectRatio).build()
655
+ this.enterPictureInPictureMode(pictureInPictureParams.build())
656
+ }
657
+ }
658
+ ```
659
+ - **Handling the PiP Transition : **When the system successfully enters PiP mode, the `onPictureInPictureModeChanged` callback is triggered. You must update the **CallCoreView** layout to `CallLayoutTemplate.Pip` at this stage.
660
+
661
+ ``` java
662
+ val callCoreView = CallCoreView(context)
663
+
664
+ override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean) {
665
+ super.onPictureInPictureModeChanged(isInPictureInPictureMode)
666
+ if (isInPictureInPictureMode) {
667
+ callCoreView.setLayoutTemplate(CallLayoutTemplate.Pip)
668
+ }
669
+ }
670
+ ```
671
+ - **Restoring Full-Screen Layout : **When the user returns to the app from PiP (restoring full screen), the onResume callback will be triggered. You should reset the layout based on the current number of participants:
672
+
673
+ - **1 v 1 Calls: **Use `CallLayoutTemplate.Float`.
674
+
675
+ - **Group Calls:** Use `CallLayoutTemplate.Grid`.
676
+
677
+ ``` java
678
+ val callCoreView = CallCoreView(context)
679
+
680
+ override fun onResume() {
681
+ super.onResume()
682
+ val allParticipants = CallStore.shared.observerState.allParticipants.value
683
+ if (allParticipants.size > 2) {
684
+ callCoreView?.setLayoutTemplate(CallLayoutTemplate.Grid)
685
+ } else {
686
+ callCoreView?.setLayoutTemplate(CallLayoutTemplate.Float)
687
+ }
688
+ }
689
+ ```
690
+
691
+ ### Keep the Screen Awake During Calls
692
+
693
+ Keeping the screen active during a call is a fundamental requirement for communication apps. The simplest and most recommended approach in Android is using the `WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON` flags.
694
+ ``` java
695
+ class CallActivity : AppCompatActivity() {
696
+ override fun onCreate(savedInstanceState: Bundle?) {
697
+ super.onCreate(savedInstanceState)
698
+
699
+ // Apply flags to handle screen behavior during calls
700
+ window.addFlags(
701
+ WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or // Show activity over lock screen
702
+ WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or // Dismiss non-secure keyguards
703
+ WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON or // Prevent the screen from sleeping
704
+ WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON // Turn the screen on when activity starts
705
+ )
706
+
707
+ setContentView(R.layout.activity_call)
708
+ }
709
+ }
710
+ ```
711
+
712
+ ### Enable Background Audio/Video Capture
713
+
714
+ To maintain audio and video capture when the app is in the background, you must implement a Foreground Service. Starting from Android 9.0 (API 28), foreground service permissions are required, and Android 14 (API 34) mandates declaring specific service types for the camera and microphone.
715
+ 1. **Configure Permissions and Service ( AndroidManifest.xml ) : **Declare the necessary foreground service permissions and specify the service types within the <application> tag.
716
+
717
+ ``` java
718
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
719
+
720
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
721
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
722
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
723
+
724
+ <application>
725
+ <service
726
+ android:name=".CallForegroundService"
727
+ android:enabled="true"
728
+ android:exported="false"
729
+ android:foregroundServiceType="camera|microphone" />
730
+ </application>
731
+ </manifest>
732
+ ```
733
+ 2. **Create the Foreground Service Class ( CallForegroundService ) : **The service ensures the system does not kill the app's process while it is in the background by displaying a persistent notification.
734
+
735
+ ``` java
736
+ import android.app.Notification
737
+ import android.app.NotificationChannel
738
+ import android.app.NotificationManager
739
+ import android.app.Service
740
+ import android.content.Context
741
+ import android.content.Intent
742
+ import android.os.Build
743
+ import android.os.IBinder
744
+ import androidx.core.app.NotificationCompat
745
+
746
+ class CallForegroundService : Service() {
747
+ companion object {
748
+ private const val NOTIFICATION_ID = 1001
749
+ private const val CHANNEL_ID = "call_foreground_channel"
750
+
751
+ /**
752
+ * Start the foreground service to maintain call connectivity
753
+ */
754
+ fun start(context: Context) {
755
+ val intent = Intent(context, CallForegroundService::class.java)
756
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
757
+ context.startForegroundService(intent)
758
+ } else {
759
+ context.startService(intent)
760
+ }
761
+ }
762
+
763
+ /**
764
+ * Stop the service once the call ends
765
+ */
766
+ fun stop(context: Context) {
767
+ val intent = Intent(context, CallForegroundService::class.java)
768
+ context.stopService(intent)
769
+ }
770
+ }
771
+
772
+ override fun onCreate() {
773
+ super.onCreate()
774
+ createNotificationChannel()
775
+ // Start foreground with notification to secure background capture permissions
776
+ startForeground(NOTIFICATION_ID, createNotification())
777
+ }
778
+
779
+ override fun onBind(intent: Intent?): IBinder? = null
780
+
781
+ private fun createNotification(): Notification {
782
+ return NotificationCompat.Builder(this, CHANNEL_ID)
783
+ .setContentTitle("Call in Progress")
784
+ .setContentText("App is running in the background to maintain the call.")
785
+ .setSmallIcon(android.R.drawable.ic_menu_call) // Replace with your app icon
786
+ .setPriority(NotificationCompat.PRIORITY_HIGH)
787
+ .build()
788
+ }
789
+
790
+ private fun createNotificationChannel() {
791
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
792
+ val channel = NotificationChannel(
793
+ CHANNEL_ID,
794
+ "Call Keep-Alive Service",
795
+ NotificationManager.IMPORTANCE_HIGH
796
+ )
797
+ val manager = getSystemService(NotificationManager::class.java)
798
+ manager?.createNotificationChannel(channel)
799
+ }
800
+ }
801
+ }
802
+ ```
803
+
804
+ ## Next Steps
805
+
806
+ Congratulations! You have implemented the answer call feature. Next, see Make Your First Call to add call initiation to your app.
807
+
808
+ ## FAQs
809
+
810
+ ### Why does the UI appear distorted or show the wrong screen after navigating to another page while in PiP mode?
811
+ - **Cause :** Android's Picture-in-Picture (PiP) mode operates based on the Task Stack. By default, all Activities in an app share the same task stack. If you launch a new Activity while the app is in PiP mode, that new page is pushed onto the current stack. Consequently, the new screen incorrectly attempts to render within the tiny PiP window, leading to UI anomalies.
812
+
813
+ - **Solution : **Declare the Call Activity as a separate task with its own affinity in the AndroidManifest.xml. This ensures the call remains isolated in its own window regardless of other app navigation.
814
+
815
+ ``` java
816
+ <activity
817
+ android:name=".view.CallActivity"
818
+ android:launchMode="singleTask"
819
+ android:taskAffinity="${applicationId}.call" />
820
+ ```
821
+
822
+ ### Can an invitee receive a call event if they go offline and then come back online within the call timeout period?
823
+
824
+ For one-on-one calls, if the callee comes online within the timeout, they will receive the incoming call invitation. For group calls, if the callee comes online within the timeout, up to 20 unprocessed group messages will be retrieved, and if there is a call invitation, the incoming call event will be triggered.
825
+
826
+ ## Contact Us
827
+
828
+ 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.