Cloud instant messaging SDK Integrate -- Domestic manufacturers push integrated stepping on the pit chapter (Android platform )
Recently, the company's new app Add instant messaging , Of course, it is impossible to achieve one by yourself ( project deadline I can't stand it ). From the mature of each family SDK Manufacturers choose from one place to another , Each has its own advantages and disadvantages . Finally, the soldiers and generals , I chose rongyun's SDK( The boss has the final say hhhh).
His home's official website and document address :
Official website ：https://www.rongcloud.cn/
Of course, this task still falls on me . The basis of IM Chat , The integration of group chat and other functions has been mentioned in another blog , Let's not talk about it here . The key point of this article is to talk about the pitfalls of accessing the push of three-party manufacturers , In order to avoid lightning for the follow-up friends into rongyun pit .
1. Why do you want to access the vendor push again ?
Integrated instant messaging SDK, our app You can't have instant messaging capabilities like wechat to receive messages anytime and anywhere ? To be honest, that's what I thought at the beginning . It's a pity that development should be done in accordance with the basic law , Android Platform recycling app We can't get through this , app You've been killed to death. What do you take for news ? We are not wechat hhhh. So after reading his family's documents in a hurry , Only then discovered app If alive, , He can use his own channel to push messages to . If app Was killed , This message is directly handed over to the three-party manufacturers on the server side of his home ( That is to say, five big manufacturers, blue and green factories, Huawei Xiaomi FCM), Let this message be sent to your mobile phone through the push channel of other manufacturers .
2. Rongyun family SDK Access vendor push guide
He made this very clear , It's almost like hand-in-hand teaching , Then I won't waste keyboard life here ( Steal laziness hhhhh). Put the official documents of his family here : https://docs.rongcloud.cn/v4/views/im/ui/guide/private/notify/push/mi.html. Please pay attention to the documents pushed by some manufacturers in his family 2.x and 4.x Ha , It's the old version of his family / new edition SDK Access to the new manufacturers in / Old push packages .
3. Count the holes I've stepped on
There are still many holes in his house ... Is dubious , I feel that his documents are meticulous , But there are still a lot of pits . Fortunately, I was able to raise the work order and let my brother solve the problem with technical support from his family ( I'm still warm-hearted , It's too expensive to build a technical support group. The boss is stingy ...), So if we step on the uneven pit , Get him a work order and it's done .
Here are some of the pits, if you haven't started getting into them yet , You don't have to look too carefully , Because some classes / You don't have access, you don't know , Just look at the number in your heart . Come here as soon as you get into a hole ctrl+F Let's see if there's any , Don't waste time .
1. The pitfalls of Huawei's old version push
The first pit I want to talk about is a real pit , It's Huawei's pot hhhhh, It's been two or three days . Repeatedly confirm with his technical support . Brother is also enthusiastic , Accompany me to the end , ( I brought the work order to his family , My brother gave Huawei a work order , Ha ha ha ). Rong Yun's family SDK The big version of is divided into the old version and the new version of , One is called 2.x One is called 4.x. (3.x I don't know where it went hhhh). other people's homes 2.x Of SDK Access to Huawei's old push package . 4.x Of SDK The update is relatively large , It's easy to access Huawei's new push package . I started with his house 2.x Of SDK.
Release the results first : A bunch of desperate integrations , After that, I found that Huawei EMUI 10 All of the above push works well , 10 The following push doesn't work well . Good! , A pile of work orders came down , It was found that Huawei's old push package was no longer maintained . or , upgrade EMUI 10 The following mobile phones HMS core, Or upgrade Huawei push package . This is good , I have to put the cloud melting SDK Upgrade to 4.x 了 . So access to rongyun home 2.x SDK My friends have paid attention to , This is a big hole .
2. Huawei pushes customized ringtones
app The second edition has a requirement , To push messages with our custom ringtones ( Put it in app Resource file in ) Make a reminder . I've tried this for a long time, but I haven't been able to do it completely OK, When the time is right, when the time is not , Sometimes it's a custom ringtone , Sometimes it's the default ringing tone of the system . It's about the technical support of the work order again. I've been talking about this problem all the time hhhh. As a result, it was confirmed that Huawei's message priority was divided into high and low levels ( High priority ). The message set by the mobile terminal is of high priority and does not count , The final priority is determined by Huawei platform and mobile terminal settings , The lower of the two . I set every message to high on the mobile end , However, the priority of some messages is judged as low priority by Nehe platform . Finally, we need to send an e-mail application with Huawei to set the message priority to high OK 了 .
Vivo Now the biggest problem is , Vivo The platform is divided into test message and official message . Vivo In the test environment, only test messages can be used to push and send tests . But all the information pushed by the service end of rongyun home is official news , So it's a dead knot . Official news can only be sent in the formal environment , But the test environment has not been tested, how to launch the formal environment ... Rongyun family has been modifying , It is estimated that the next version will be able to transmit parameters, and choose whether to send test messages or official messages
Access Oppo The wind is calm and everything is going well ... There is no pit
The access to Xiaomi is smooth and smooth ... There is no pit