Skip to content
프로젝트

소개

RongCloud Server SDK in Java.

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

server-sdk-java

RongCloud IM Server SDK in Java.

Integration

  • Get the JAR from the Maven repository
  • Maven
    <dependency>
        <groupId>cn.rongcloud.im</groupId>
        <artifactId>server-sdk-java</artifactId>
        <version>4.0.16</version>
    </dependency>
  • Gradle
    compile group: 'cn.rongcloud.im', name: 'server-sdk-java', version: '4.0.16'
  • Build from source
   1. Download or clone `server-sdk-java`
   
   2. Navigate to the `server-sdk-java` directory
   
   3. Install dependencies with `mvn install`
   
   4. Package with `mvn clean package`
  • Runtime environment

    Java version 7+

Usage

Go to the Developer Console to create an app and get your App Key and Secret.

Here’s how to register a user:

  String appKey = "appKey";
  String appSecret = "appSecret";
      
  // Initialize the RongCloud SDK, Set up the data center you use.
  RongCloud rongCloud = RongCloud.getInstance(appKey, appSecret,CenterEnum.BJ);
  User user = rongCloud.user;

  /**
  *
  * Register a user and generate a unique Token in RongCloud
  */
  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());
# Print result
# getToken: {"reqBody":"userId=userxxd2&name=username&portraitUri=http%3A%2F%2Fwww.rongcloud.cn%2Fimages%2Flogo.png","code":1002,"errorMessage":"Invalidate App-Key.","requestId":"0c1f127e9bc1401bb05eaad61b4502f7"}

Note: Each API call returns a unique request ID, which identifies the request to RongCloud.

Examples

User module example
Message module example
Group module example
Chatroom module example
Conversation module example
Sensitive word module example
Ultra group module example

Version notes

We’ve updated to SDK version 3.8.0 for easier integration and better maintenance. Data center must be specified for new version initialization

관련 프로젝트 살펴보기

불러오는 중…