Background:

Recently, the company’s new app will add instant messaging function, which is impossible to implement quickly (the deadline of the project is not able to stand up to it). From the various mature SDK vendors to choose, each has their own good and their own shortcomings. Finally, I chose rongyun’s SDK(boss says HHHH). His official website and document address: official website: www.rongcloud.cn/ document: docs.rongcloud.cn/v4 This task of course still falls on my head. Basic IM chat, group chat, and other integration features were covered in another blog post, but not here. The key point of this article is to talk about the pits when the third-party manufacturers push, so as to avoid thunder for the friends who follow into the cloud pit.

1. Why do I need to access vendor push again?

With the INTEGRATION of instant messaging SDK, our app can have instant messaging ability like wechat at any time and anywhere. To be honest, that’s what I thought at first. Unfortunately, development should also be done according to the basic law, the Android platform recycling app this pass we can not pass, app has been killed by you thoroughly how can you receive information? We are not wechat HHHH. So after reading his family’s documents, I found that if app is alive, he can use his own channel to push the message to you. If the app is killed, the message will be directly handed over to three manufacturers (namely huawei Xiaomi FCM, one of the five big manufacturers) at the server end of his home, and the message will be sent to your phone through the push channel of other manufacturers.

2. Rongyunjia SDK access vendor push guide

This family speaks quite clearly, all approximate hand to hand teaches, then I also won’t waste this keyboard life (steal lazy HHHHH). His official documentation to here a stick well: docs. Rongcloud. Cn/v4 / views/im… Please note that the documents pushed by some manufacturers in his home are divided into 2.x and 4.x ha, corresponding to the new/old version push packages of manufacturers accessed in his old version/new version SDK.

3. Count the holes I step in

He’s got a lot of holes in his house… Look, feel his documents although meticulous, but still many pits. Fortunately, I can put up a work order for his technical support brother to solve the problem. (My brother is still quite enthusiastic, it is too expensive to build a technical support group. “, so if you step on the pit is really uneven, quickly give him a work order to finish.

If you haven’t started to pit, you don’t need to look too carefully, because there are some classes/methods that you don’t know, just look at the number in your mind. If you run into a pit, hit CTRL +F here and see if you can find one. Don’t waste your time.

3.1 huawei

The first pit I want to say is a real pit, huawei pot HHHHH, this has bothered me for two or three days. Check back and forth with his tech support. Elder brother is also enthusiastic, accompany me to the end, (I gave his family to put forward the work order, elder brother to Huawei put forward the work order, ha ha ha). The SDK of Rongyun is divided into the old version and the new version, one is called 2.x and the other is called 4.x. (where is 3.x? I don’t know HHHH). The SDK of 2.X of his family is connected to huawei’s old push package. The SDK of 4.X is relatively updated, so huawei’s new push package is simply connected to it. I used the SDK of his home 2.x at the beginning. The result is published first: a bunch of integration of desperate and desperate. After that, I found that Huawei EMUI push above 10 works well, and push below 10 does not work. Well, after a pile of work orders, HUAWEI found that the old push package huawei no longer maintain. Either upgrade HMS Core on phones below EMUI 10 or upgrade Huawei push pack. Great, I have to upgrade rongyun SDK to 4.x again. So if you have access to rongyunjia 2.x SDK, please note that this is a big pit.

2. There is a requirement for the second version of Huawei app to remind the pushed messages with our self-defined ringtones (resource files in the APP). I have been trying to do this for a long time, but it is not completely OK. Sometimes it is a custom ringtone, sometimes it is the default ringtone of the system. Again, the technical support guy who deals with the work order keeps talking about this problem HHHH. Finally, it is confirmed that the message from Huawei has a higher priority (higher priority). The message with a high priority set on the mobile terminal does not count. The final priority is determined by huawei platform and mobile terminal Settings. I set every message to high on the mobile, but the platform identifies some messages as low priority. Finally, you need to send an email to Huawei to apply for setting the message priorities as high as possible.

3.2 Vivo

The biggest problem with Vivo right now is that the Vivo platform is divided into test messages and official messages. Vivo test environment can only use test message push to test. However, rongyunjia server push out official messages, so this has become a dead end. The official message can only be sent by the official environment, but the test environment did not test how to launch the official environment… Rongyun home has been modifying, it is estimated that the next version will be able to send test message or formal message parameter selection

3.3 Oppo

Access Oppo smooth sailing and everything goes well… What’s the problem

3.4 millet

Access Xiaomi calm everything goes well… What’s the problem