2.4.2 • Published 4 months ago

react-native-chat-uikit v2.4.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

中文 | English


react-native-chat-uikit

这是 agora uikit sdk 的说明文档。

环境需求

  • react-native: 0.63.5 以上
  • nodejs: 16.18.0 以上

下载地址

git clone git@github.com:AgoraIO-Usecase/AgoraChat-rn.git

初始化

在终端命令工具中,切换到 项目根目录。

cd react-native-chat-library
yarn && yarn run generate-source-env

基本介绍

在 agora chat sdk 基础上设计了 agora uikit sdk。通过这些 UI 组件可以更加高效的实现应用开发。除了 UI 组件还提供了必要的 agora chat sdk 的封装以及一些基础工具,尽最大可能提供开发应用的便利性。

功能列表

会话列表组件

  • 提供的接口
    • update: 更新会话列表项
    • create: 创建会话列表项
    • remove: 移除会话列表项
    • updateRead: 设置会话已读
    • updateExtension: 设置会话自定义字段
  • 提供的属性或者事件回调
    • propsRef: 设置会话列表控制器
    • onLongPress: 通知长按会话列表项
    • onPress: 通知点击会话列表项
    • onUpdateReadCount: 通知会话列表项更新
    • sortPolicy: 设置会话列表项排序规则
    • RenderItem: 自定义列表项的样式

聊天详情组件

  • 提供的接口
    • sendTextMessage: 发送文本消息
    • sendImageMessage: 发送图片消息
    • sendVoiceMessage: 发送语音消息
    • sendCustomMessage: 发送自定义消息
    • sendFileMessage: 发送文件消息
    • sendVideoMessage: 发送视频消息
    • sendLocationMessage: 发送定位消息
    • loadHistoryMessage: 加载历史消息
    • deleteLocalMessage: 删除本地消息
    • resendMessage: 重新发送失败的消息
    • downloadAttachment: 下载消息附件
  • 提供的属性或者事件回调
    • propsRef: 设置聊天组件控制器
    • screenParams: 设置聊天组件的参数
    • messageBubbleList: 自定义消息气泡组件
    • onUpdateReadCount: 通知更新消息未读数
    • onClickMessageBubble: 点击消息气泡通知
    • onLongPressMessageBubble: 长按消息气泡通知
    • onClickInputMoreButton: 点击更多按钮通知
    • onPressInInputVoiceButton: 按下语音按钮通知
    • onPressOutInputVoiceButton: 抬起语音按钮通知
    • onSendMessage: 发送消息前的通知
    • onSendMessageEnd: 发送消息结束的通知
    • onVoiceRecordEnd: 录制语音消息结束的通知

聊天气泡组件

  • 提供的接口
    • scrollToEnd: 滚动到页面下方
    • scrollToTop: 滚动到页面上方
    • addMessage: 添加消息
    • updateMessageState: 更新消息状态
    • delMessage: 删除消息气泡项
    • resendMessage: 重新发送消息
  • 提供的属性或者事件回调
    • onRequestHistoryMessage: 下拉刷新请求历史消息通知
    • TextMessageItem: 自定义文本消息的样式
    • ImageMessageItem: 自定义图片消息的样式
    • VoiceMessageItem: 自定义语音消息的样式
    • FileMessageItem: 自定义文件消息的样式
    • LocationMessageItem: 自定义定位消息的样式
    • VideoMessageItem: 自定义视频消息的样式
    • CustomMessageItem: 自定义自定义消息的样式

其它组件

其它组件处于实验性阶段,如果感兴趣可以尝试使用。

UI 基础组件:提供基本的样式和使用。参考 国际化工具:提供界面语言的设置。参考 模态组件管理工具:提供统一的模态窗口显示和隐藏。参考 工具类:提供必要的功能。参考 粘贴板服务:提供复制粘贴服务。 持久化存储服务:提供 key-value 服务。 媒体服务:提供打开媒体库,选择图片、视频、文件服务。 权限服务:提供 ios 或者 android 平台权限申请的服务。 文件服务:提供文件夹的管理服务。

示例演示

参考

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

2.4.1

8 months ago

2.4.0

8 months ago

2.4.2

6 months ago

2.4.2-beta.0

7 months ago

2.4.3-beta.1

4 months ago

2.4.3-beta.0

5 months ago

2.3.0-alpha.2

12 months ago

2.3.0-alpha.0

1 year ago

2.3.0

11 months ago

2.2.1

1 year ago

2.2.0

1 year ago

2.2.2

1 year ago

2.2.0-alpha.0

1 year ago

2.1.0

1 year ago

2.1.0-beta.4

1 year ago

2.1.0-beta.3

1 year ago

2.1.0-beta.1

1 year ago

2.1.0-beta.2

1 year ago

2.1.0-beta.0

1 year ago

2.0.0-beta.0

1 year ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.2-beta.0

2 years ago

1.0.2-beta.1

2 years ago

0.1.1-beta.3

2 years ago

0.1.1-beta.2

2 years ago

0.1.1-beta.1

2 years ago

0.1.1-beta.0

2 years ago