File tree Expand file tree Collapse file tree 2 files changed +5
-17
lines changed Expand file tree Collapse file tree 2 files changed +5
-17
lines changed Original file line number Diff line number Diff line change 6666}
6767```
6868
69- ## 4. 初始化聊天页面
70-
71- 向工程中导入 Chat 文件。
72-
73- ``` objectivec
74- // ConversationId 接收消息方的声网ID:@"user2"
75- // type 聊天类型:AgoraChatConversationTypeChat 单聊类型
76- // createIfNotExist 如果会话不存在是否创建会话:YES
77- AgoraChatViewController *chatViewController = [[AgoraChatViewController alloc ] initWithConversationId: @"user2" conversationType: AgoraChatConversationTypeChat ] ;
78- [ self.navigationController pushViewController: chatViewController animated: YES ] ;
79- ```
80-
81- 若有导航,可以用 push 方式跳转到聊天页面发消息测试,也就是用登录的 user1 向 user2 发消息;若没有导航的话,可以用 present 方式跳转到聊天页面。
82-
83- ### 2. 注册即时通讯 IM 用户
69+ ## 4. 注册即时通讯 IM 用户
8470
8571#### 创建用户
8672
10894
10995![ img] ( /images/android/user_token.png )
11096
111- ## 6 . 登录账号
97+ ## 5 . 登录账号
11298
11399利用创建的用户 ID 和密码登录即时通讯 IM。
114100
120106}] ;
121107```
122108
123- ## 7 . 发送消息
109+ ## 6 . 发送消息
124110
125111利用创建的用户 ID 和密码登录即时通讯 IM,向对端用户发送消息。在下面示例中,向 user 2 发送文本消息。
126112
Original file line number Diff line number Diff line change @@ -77,13 +77,15 @@ implementation("cn.shengwang:chat-uikit:1.3.2")
7777
7878- 在 Project 的 ` settings.gradle.kts ` 文件中添加如下代码:
7979
80+ // TODO:替换下面括号中的相对链接
8081``` kotlin
8182include(" :chat-uikit" )
8283project(" :chat-uikit" ).projectDir = File (" ../AgoraChat-UIKit-android/ease-im-kit" )
8384```
8485
8586- 在 app 的 ` build.gradle.kts ` 文件中添加如下代码:
8687
88+ // TODO:查看是否要替换代码中括号中的 chat-uikit
8789``` kotlin
8890// chatuikit-android
8991implementation(project(mapOf (" path" to " :chat-uikit" )))
You can’t perform that action at this time.
0 commit comments