server-sdk-java

by rongcloud

rongcloud / server-sdk-java

RongCloud Server SDK in Java.

223 Stars 213 Forks Last release: Not found MIT License 165 Commits 29 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

server-sdk-java

RongCloud IM Server SDK in Java.

集成

  • 中央仓库获取JAR
  • Maven
        cn.rongcloud.im
        server-sdk-java
        3.1.6
    
    
  • Gradle ``` compile group: 'cn.rongcloud.im', name: 'server-sdk-java', version: '3.1.6'
   * 基于源码 Meavn 打包构建

1、下载或克隆

server-sdk-java

2、进入项目

server-sdk-java
目录

3、安装依赖

mvn install

4、打包

mvn clean package
   * 运行环境

Java版本  7+

使用

请前往 开发者后台 创建应用 -> 获取 Appkey、Secret

以注册用户为例

String appKey = "appKey"; String appSecret = "appSecret";

RongCloud rongCloud = RongCloud.getInstance(appKey, appSecret); User user = rongCloud.user;

/** * API 文档: http://www.rongcloud.cn/docs/serversdkapi/user/user.html#register * * 注册用户,生成用户在融云的唯一身份标识 Token */ UserModel userModel = new UserModel() .setId("hHjap87") .setName("RongCloud") .setPortrait("http://www.rongcloud.cn/images/logo.png"); TokenResult result = user.register(userModel); System.out.println("getToken: " + result.toString());

文档

文档迁移至: http://www.rongcloud.cn/docs/server_sdk_api/

示例

用户模块示例
消息模块示例
群组模块示例
聊天室模块示例
会话模块示例
敏感词模块示例

版本说明

为方便开发者的接入使用,更好的对融云 Server SDK 进行维护管理,现更新SDK 3.0 版本,老版本的 Server SDK仍可使用 但不兼容。

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.