Integrate OPPO Push into your Android app in three steps: register for the push service, add the SDK and configuration, then verify delivery.
Register for OPPO Push
Create an account on the OPPO Open Platform and apply for the push service. For setup instructions, see the OPPO Push Platform User Guide.
Integrate OPPO Push
Install the Push - OPPO component using the same process as adding the push SDK. For details, see Add the SDK. The Push - OPPO component contains only adaptation code and does not include the OPPO Push SDK.
Download the OPPO Push SDK from the OPPO SDK documentation and integrate it into your main project. The currently supported version is
3.4.0. You can upgrade to a later version if needed — vendor SDKs are typically backward compatible. For help with an unsupported version, join DingTalk group 145930007362 to request it.-
Configure
AndroidManifest.xml. For component-based integration, add this configuration in the Portal project. Replace the placeholder values forcom.oppo.push.app_keyandcom.oppo.push.app_secretwith the credentials from the OPPO Open Platform.<uses-permission android:name="com.coloros.mcs.permission.RECIEVE_MCS_MESSAGE" /> <uses-permission android:name="com.heytap.mcs.permission.RECIEVE_MCS_MESSAGE"/> <application> <service android:name="com.heytap.msp.push.service.CompatibleDataMessageCallbackService" android:exported="true" android:permission="com.coloros.mcs.permission.SEND_MCS_MESSAGE" android:process=":push"> <intent-filter> <action android:name="com.coloros.mcs.action.RECEIVE_MCS_MESSAGE"/> </intent-filter> </service> <service android:name="com.heytap.msp.push.service.DataMessageCallbackService" android:exported="true" android:permission="com.heytap.mcs.permission.SEND_PUSH_MESSAGE" android:process=":push"> <intent-filter> <action android:name="com.heytap.mcs.action.RECEIVE_MCS_MESSAGE"/> <action android:name="com.heytap.msp.push.RECEIVE_MCS_MESSAGE"/> </intent-filter> </service> <meta-data android:name="com.oppo.push.app_key" android:value="Get from the OPPO Open Platform" /> <meta-data android:name="com.oppo.push.app_secret" android:value="Get from the OPPO Open Platform" /> </application> -
If you use obfuscation, add the following rules:
Add the OPPO Push obfuscation rules for all connection types.
For the AAR connection type, also add the mPaaS obfuscation rules.
-
If you use OPPO Push version
3.4.0, add this dependency:implementation 'commons-codec:commons-codec:1.15'
Test OPPO Push
Launch your app on an OPPO device and confirm the initialization method is called. For details, see Message Push Service Initialization. The push SDK automatically obtains and reports the vendor token for OPPO Push.
-
Stop the app process, then send a test push notification:
If the notification arrives, the integration is complete.
If the notification does not arrive, follow the troubleshooting steps below.
Troubleshooting
Confirm that you have configured
AndroidManifest.xml. Verify that the values forcom.oppo.push.app_keyandcom.oppo.push.app_secretmatch what is shown on the OPPO Open Platform.In the mPaaS console, confirm that the OPPO channel is enabled. For details, see Channel Configuration. Verify that these settings match those on the OPPO Open Platform.
-
Check the logcat logs for each of the following:
-
In the push process, filter by
mPush.PushProxyFactoryand look for:D/mPush.PushProxyFactory: found proxy com.mpaas.push.external.oppo.CreatorIf this log entry is missing, the Push - OPPO component may not be installed correctly.
In the push process, filter by
mOPPOto check whether the OPPO vendor token was obtained. A log entry containing "OPPO onRegister error" or aresponseCodeother than 0 means registration failed. Look up the error code in the OPPO Push Error Codes document to identify the cause.-
In the main process, filter by
report channel tokento check whether the vendor token was reported successfully. The following log entry indicates a reporting failure:report channel token error: xxxxIf you see this error, confirm that
base64Codein the mPaaS configuration file has a value. Also confirm that the APK signature you uploaded to generate the configuration file matches the signature of the current build. In the push process, filter by
mcssdkto review the internal OPPO Push logs.
-
If the issue persists, submit a ticket or contact the mPaaS helpdesk.
FAQ
What models and system versions does OPPO Push support?
OPPO Push supports OPPO devices running ColorOS 3.1 or later, OnePlus 5/5T and later models, and all realme devices.
ColorOS is OPPO's mobile operating system, a customized build of Android.