This guide mainly introduces the process of integrating vivo Push. The process falls into three steps:
Register vivo Push
Integrate vivo Push
Add Push - vivo component in the IDE plugin. The steps are roughly the same as adding MPS SDK, see Add SDK.
The component has integrated the vivo Push SDK V2.3.4. You can upgrade the vivo Push SDK on demand. Generally, the vendor's SDK is downward compatible. If it is not compatible, you can submit a ticket about the adaption issue.
AndroidManifest.xml, and replace the values of
com.vivo.push.app_id. If you integrate the vivo Push SDK through Portal & Bundle projects, please configure the
AndroidManifest.xmlin the Portal project.
<application> <service android:name="com.vivo.push.sdk.service.CommandClientService" android:process=":push" android:exported="true" /> <activity android:name="com.vivo.push.sdk.LinkProxyClientActivity" android:exported="false" android:process=":push" android:screenOrientation="portrait" android:theme="@android:style/Theme.Translucent.NoTitleBar" /> <meta-data android:name="com.vivo.push.api_key" android:value="Provided by vivo Developers Platform" /> <meta-data android:name="com.vivo.push.app_id" android:value="Provided by vivo Developers Platform" /> </application>
To use obfuscation, you need to add the related obfuscation configurations.
Test vivo Push
After integrating vivo Push, you can start the app on your vivo phone, and the MPS SDK will automatically get the OPPO Push token and report it. Before you start the app, make sure that you have called the initialization method, see Message push initialization.
Push test messages when the app process is killed:
If you can still receive the messages, it means that the app has successfully integrated vivo Push.
If you cannot receive the messages, you can follow the steps below for troubleshooting.
AndroidManifest.xmlhas related configurations added, and check if the values of
com.vivo.push.app_idare the same as that on vivo Developers Platform.
Check if vivo Push is enabled in the mPaaS console (see Configure vivo Push), and the relevant configurations are consistent with that on vivo Developers Platform.
View the logs in Logcat to troubleshoot:
mPush.PushProxyFactory, and check if the following log exists:
D/mPush.PushProxyFactory: found proxy com.mpaas.push.external.vivo.Creator
If not, it means that there may be a problem with the Push - vivo component. Check if the component has been correctly added.
mVIVO, and check if the channel token of vivo Push has been obtained. If the following log (“fail to turn on vivo push”) appears:
It means the vivo Push registration failed, see vivo Push Error Codes.
Select the main process, filter
report channel token, check if the channel token of vivo Push has been successfully reported. If the following log appears:
report channel token error: xxxx
It means the channel token reporting failed, you need to check if the
base64Codein the mPaaS configuration file has a value, and check if the apk signature that you uploaded when obtaining the configuration file is consistent with the app.
If the above steps do not resolve the issue, you can submit a ticket or contact the mPaaS support staff.
Models and OS versions supported by vivo Push
The models and earlier system versions supported by vivo Push are listed in the following table. For other questions on vivo Push, see vivo Push FAQs.