This topic mainly introduces the process of integrating vivo Push. The process falls into three steps.
Register vivo Push
Register an account on the vivo Developers Platform and request to integrate the push service with reference to vivo Push Platform Operation Guide.
Integrate vivo Push
Add Push - vivo component in the IDE plugin. The steps are roughly the same as adding MPS SDK, see Add SDK Procedure. The Push - vivo component only contains the adaptation code and does not include the vivo Push SDK.
Go to the vivo SDK documentation to download the SDK and integrate it into the main project. The current compatible version is v2.3.4. If you need to use a higher version, you can modify it as needed. Generally, manufacturer SDKs are backward compatible. If you find that they are not compatible, please join the DingTalk group 145930007362 to report your need for adapting to the new version.
Configure
AndroidManifest.xml(add it in the Portal project through Portal & Bundle projects) and replace the values ofcom.vivo.push.api_keyandcom.vivo.push.app_id.<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 Open Platform" /> <meta-data android:name="com.vivo.push.app_id" android:value="Provided by VIVO Open Platform" /> </application>To use obfuscation, you need to add the related obfuscation configurations.
No matter which integration method is used in integrating vivo push SDK, you need to add vivo push obfuscation rules.
If you integrated vivo push SDK through Native AAR, you need to add mPaaS obfuscation rules.
Test vivo Push
After integrating vivo Push, you can start your App on a vivo phone and make sure to call the initialization method (see Initialize Message Push). The Message Push SDK will automatically obtain the vivo push manufacturer token and report it.
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.
Troubleshooting
Check if
AndroidManifest.xmlhas related configurations added, and check if the values ofcom.vivo.push.api_keyandcom.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:
Select the
pushprocess, filtermPush.PushProxyFactory, and check if the following log exists:D/mPush.PushProxyFactory: found proxy com.mpaas.push.external.vivo.CreatorIf not, it means that there may be a problem with the Push - vivo component. Check if the component has been correctly added.
Select the
pushprocess, filtermVIVO, and check if the channel token of vivo Push has been obtained. If the 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 the
report channel token, and check whether the vivo manufacturer token is successfully reported. If the following log appears:report channel token error: xxxxThis indicates that the manufacturer token failed to be reported. Please check whether the
base64Codevalue in the mPaaS configuration file exists, and whether the APK signature uploaded when obtaining the configuration file is consistent with the current application.
FAQ
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.
