1 Star 0 Fork 0

融云 RongCloud / android-voiceroom-quickdemo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

融云语聊房SDK QuicKDemo

使用步骤

第一步:在QuickApplication中添加appkey

private final static String APP_KEY = "";

第二步:在utils/AccoutManager.java的static代码块中添加测试账号 即可运行

static {
    // TODO: 2021/8/31  must add account
    //  Accout accout = new Accout("Your UserId", "Your UserName");
    //  accout.token = "Your Token ";//token 需和userId一一对应
    //  accounts.add(accout);
}

功能演示定义枚举列表

seat_mute("麦位静音"),
seat_mute_un("取消麦位静麦"),
seat_lock("麦位锁定"),
seat_lock_un("取消麦位锁定"),
seat_enter("上麦"),
seat_left("下麦"),
seat_request("请求上麦"),
seat_request_cancel("取消上麦请求"),
seat_extra("扩展属性"),
seat_pick_out("抱下麦"),
room_all_mute("全麦静麦"),
room_all_mute_un("取消全麦静音"),
room_all_lock("全麦锁麦"),
room_all_lock_nu("取消全麦锁定"),
room_update_name("修改名称"),
room_update_count("修改麦位数"),
room_free("自由模式"),
room_free_un("申请模式"),
invite_seat("邀请上麦");
- 后续会跟新更多演示功能

Demo 结构

  • Application执行init

    • RCVoiceRoomEngine.getInstance().initWithAppKey(this, APP_KEY);
  • ConnectActivity

    • 列表展示AccoutManager.java中添加的测试账号
    • 选取 一个测试账号即可连接 注意:第一个账号模拟房主创建房间,其他账号模拟观众加入房间
    • RCVoiceRoomEngine.getInstance().connectWithToken(context, accout.getToken(), new RCVoiceRoomCallback())
  • BaseApiActivity

    • api 演示的基类 统一处理:房间事件监听,和麦位信息的管理
  • CreaterActivity

    • 模拟房主创建房间的场景 继承至BaseApiActivity
    • ActionBar显示房间操作的action按钮
  • JoinActivity

    • 模拟观众进房间的场景 继承至BaseApiActivity
    • 不显示房间操作的action按钮
  • QuickEventListener

    • 单例实现房间事件
    • 通过监听对外提供房间数据和麦位列表数据
  • ApiFunDialogHelper

    • 对demo中的弹框统一封装处理
  • VoiceRoomApi

    • 具体实现演示api的功能接口
MIT License Copyright (c) 2021 融云 RongCloud Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/rongcloud/android-voiceroom-quickdemo.git
git@gitee.com:rongcloud/android-voiceroom-quickdemo.git
rongcloud
android-voiceroom-quickdemo
android-voiceroom-quickdemo
main

搜索帮助