How to implement IM function through Getui SDK

Since the service was launched more than 4 years ago, Getui has served more than 190,000 app developers and 350,000 apps, boosting the refined operation of countless famous partners' apps.
However, most developers do not understand that the IM function can also be implemented with the push SDK of Getui. As a push team that has made an IM communication app, it must not be a problem to meet the needs of most developers for the use of IM. At present, the partners who realize the IM function through Getui SDK also have a certain scale.

1. Application scenario :
The IM function needs to be implemented in the application that has been connected to the Getui SDK, which is divided into client A and client B. Clients A and B send messages to each other, enable separate chat mode or use group chat mode between multiple clients, and the content can be text rich media messages: text, pictures, audio and video, transparent transmission of messages, etc.

2. Implementation principle:
The overall process of client A sending a message to client B is as follows:
1. Client A sends the message to a third-party server C (ie, the client's own server), which needs C to relay the push message.
2. Send the message to the Ge Push server D by calling the API interface of the Ge Push server SDK (single push or batch push).
3. Find the user according to the conditions, and then send the message to client B, so that client B receives the message.
Conversely, client B sends a message to client A, and the process is the same.
The server-side code needs to be written locally by a push SDK user, please write it according to the actual needs of your app.

3. The process of message push:
How to implement IM function through Getui SDK
Remarks:
A: Client AB: Client B
C: Third-party server D: Personal push server

4. Notes:
Single push:
The above application scenario is only for point-to-point push, just use the single push interface, set the ClientID or alias parameters, and the push server will automatically go to the corresponding client and push messages.
Group push:
If you want to push a group, you need to call the batch push API to push.
Group settings can be divided by tags. When pushing, push is performed according to the tag, regardless of the number of users under the tag, the personal push server will query all users under this tag, and then push the message.

In addition, because the normal delay of Getui SDK is below 250ms, the delay of IM will also be very low.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324893927&siteId=291194637