Announcements
Features
SDK for Android
SDK for iOS
SDK for macOS
AppID, AppKey, and AppSecret. For more information, see Meizu Development Documentation.AppID, AppKey, and AppSecret and paste them into Tencent Push Notification Service console > Configuration Management > Basic Configuration > Meizu Official Push Channel.implementation 'com.tencent.tpns:meizu:[VERSION]-release'// For Meizu pushes, [VERSION] is the version number of the current SDK and can be obtained from the "SDK for Android".
Other-Push-jar folder and import the Meizu push-related JAR package. Import mz4tpns1.1.2.1.jar to the project folder.package com.meizu.cloud.pushinternal;public class R {public static final class drawable {// Obtain the `stat_sys_third_app_notify.png` resource file from the `flyme-notification-res` folder in `Other-Push-jar` > `meizu` of the TPNS SDK package, and copy it to the resource directory of the application.public static final int stat_sys_third_app_notify = com.tencent.android.tpns.demo.R.drawable.stat_sys_third_app_notify;}}
AndroidManifest file:<application><!-- Note: This is the beginning of permissions required by Meizu push --><serviceandroid:name="com.meizu.cloud.pushsdk.NotificationService"android:exported="true" /><!-- version 4.1.0--><receiverandroid:name="com.meizu.cloud.pushsdk.MzPushSystemReceiver"android:exported="false"android:permission="com.meizu.flyme.permission.PUSH"><intent-filter><action android:name="com.meizu.flyme.push.intent.PUSH_SYSTEM" /></intent-filter></receiver></application><!-- version 4.1.0--><uses-permission android:name="com.meizu.flyme.permission.PUSH" /><!-- version 3.9.0--><!-- Note: This is the beginning of permissions required by Meizu push --><!-- Compatible with Flyme v5.0 or earlier. Meizu's internal integration pushSDK is required; otherwise, messages cannot be received --><uses-permission android:name="com.meizu.flyme.push.permission.RECEIVE"></uses-permission><permissionandroid:name="${applicationId}.push.permission.MESSAGE"android:protectionLevel="signature" /><uses-permission android:name="${applicationId}.push.permission.MESSAGE"></uses-permission><!-- Compatible with Flyme 3.0 configuration permissions --><uses-permission android:name="com.meizu.c2dm.permission.RECEIVE" /><permissionandroid:name="${applicationId}.permission.C2D_MESSAGE"android:protectionLevel="signature"></permission><uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" /><!-- Note: this is the end of permissions required by Meizu push -->
receiver configuration in AndroidManifest.xml:<receiverandroid:name="com.tencent.android.mzpush.MZPushMessageReceiver"android:exported="true"><intent-filter><!-- Receive push message --><action android:name="com.meizu.flyme.push.intent.MESSAGE" /><!-- Receive register message --><action android:name="com.meizu.flyme.push.intent.REGISTER.FEEDBACK"/><!-- Receive unregister message --><action android:name="com.meizu.flyme.push.intent.UNREGISTER.FEEDBACK"/><action android:name="com.meizu.c2dm.intent.REGISTRATION" /><action android:name="com.meizu.c2dm.intent.RECEIVE" /><category android:name="app package name"></category></intent-filter></receiver>
stat_sys_third_app_notify to the drawable folders for each resolution. For more information, download Tencent Push Notification Service Android SDK and refer to the flyme-notification-res folder in Other-Push-jar > meizu.XGPushManager.registerPush:// Set the Meizu AppId and AppKey.XGPushConfig.enableOtherPush(context, true);XGPushConfig.setMzPushAppId(this, APP_ID);XGPushConfig.setMzPushAppKey(this, APP_KEY);
// If the TPNS token and Meizu token are successfully obtained and bound, the registration is successful.I/TPush: [OtherPushClient] handleUpdateToken other push token is: V5R5b7c02********47744c6b635e464b527e487802 other push type: meizuI/TPush: [PushServiceBroadcastHandler] >> bind OtherPushToken success ack with [accId = 150000**** , rsp = 0] token = 0398291156ce7d2f****66bd0952c87c372f otherPushType = meizu otherPushToken = V5R5b7c02********47744c6b635e464b527e487802
proguard-rules.pro file at the application project level.-dontwarn com.meizu.cloud.pushsdk.**-keep class com.meizu.cloud.pushsdk.**{*;}
whiteList = ["R.drawable.stat_sys_third_app_notify"]
[OtherPushClient] handleUpdateToken other push token is : other push type: mezu
OtherPush to view the return code logs, for example, [OtherPush_XG_MZ] onRegisterStatus BasicPushStatus{code='110000', message='Invalid appId'}. Then locate the error cause and rectify the error by referring to Troubleshooting Vendor Channel Registration Failures.Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback