A guide to cloud integration -Android Push article
When integrating push , We need to understand the definition of push in rongyun first ： Push Notification is when the receiver's main process is killed or recycled , Or you can call disconnect() The operation of , Lead to IM After the long connection channel is disconnected from the server . under these circumstances , Will receive Push service ;
To put it bluntly , That is, the application process is killed , Will receive push Of , Otherwise , It will take the long link channel inside the fusion cloud ; If you don't even know the application process , I'm going to pick up my 40 meter sword .
Okay , End of premise Introduction , Next , We're officially taking refuge .
The push of rongyun is divided into two categories ：RongPush And other vendors push ; As for why there are manufacturers pushing , The main book is due to well-known reasons , Various mobile phone manufacturers for the system room Too deep , That leads to cloud melting push The process service can not self start and can not persist with the service background , So in order to satisfy offline ,push The arrival rate of , So we have access to the mainstream vendor push service , As for you, say , Why not access Unified Push Alliance , It is estimated that the push alliance will hatch out , It may have to wait until 2045 Years. ; ha-ha , I don't think I'll start introducing access again , We're going to get angry .
Dear guests , Calm down , Start now . In this article, we will first introduce the pitfalls encountered in Huawei's push process ;
First , According to the description on rongyun's official website , Melting clouds SDK Now there are two versions ,2.x Version of SDK as well as 4.x Version of SDK , The corresponding ones are Huawei's 2.x Of jar as well as 4.x Of jar , You can refer to 2.x edition as well as 4.x edition , Integrate according to the document , The specific integration process can be integrated according to the document , There is no need to say much about ;
Next , First, I'm integrating 2.x Problems with the version ：
1. Problem one , The corresponding application ID is not filled in ;（ Here is my pot , I didn't read the documents carefully ）;
According to the description of rongyun document ,
Fill in the corresponding Huawei's appkey Wait for the data , And stupid I didn't fill in the corresponding AppID、AppSecret, I hope you all Don't be as stupid as I am in the integration process ;
2. Problem two , According to the document configuration , result , Still can't receive push , There will be no investigation ;
It seems that this problem , A lot of friends have met , therefore , I found an official investigation method in rongyun knowledge base , For your reference only https://support.rongcloud.cn/... , If you still can't decide , You can directly find rongyun for technical support ;
The above is integration 2.x Problems with the version , Not particularly difficult , It's also easier to solve ;
however , It's not as simple as it should be , It's been a month , The project needs to be upgraded 4.x Melting cloud SDK , therefore , Huawei's push should also be upgraded accordingly , So I was happy to prepare a serious advice 4.x file , not so bad , The documentation is simple ;
therefore , The corresponding question , There have been ：
problem 1： In the process of upgrading , I didn't find agconnect-servics.json Download address of the file .
After communication with the cloud technology personnel , Huawei provides 5.0 Version of the push service ,agconnect-servics.json Download location changed , So I'll give you the download path I know , In Huawei's Developer Platform - In my project - Download the corresponding project .
problem 2: Because I came from 2.x Upgrade to 4.x Of , therefore , Blind, I didn't see the document clearly AndroidMainfest The configuration in is to be deleted , So the file couldn't be found , So please see the title clearly , Is to delete the configuration , It's not adding configuration ;
problem 3: stay EMUI 10 above Can receive push , But in EMUI 10 following , Can't receive push .
This problem can be determined through communication with rongyun technicians and Huawei technicians , As Huawei no longer continues to maintain 2.0 Push service , Change to push 4.0 The above services , however 4.0 The push service of , Right again HMSCore It was requested by , So you can only upgrade the user's HMSCore service , However, rongyun provides upgraded monitoring to the outside world , For details, please refer to Cloud document .