This repository was archived by the owner on Nov 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 84
This repository was archived by the owner on Nov 19, 2018. It is now read-only.
flyme 推送的点击事件目前还不能用是吗 #201
Copy link
Copy link
Open
Description
4.6.1版本:
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.avos.avoscloud;
import android.content.Context;
import android.content.Intent;
import com.avos.avoscloud.LogUtil.avlog;
import com.meizu.cloud.pushsdk.MzPushMessageReceiver;
import com.meizu.cloud.pushsdk.notification.PushNotificationBuilder;
import com.meizu.cloud.pushsdk.platform.message.PushSwitchStatus;
import com.meizu.cloud.pushsdk.platform.message.RegisterStatus;
import com.meizu.cloud.pushsdk.platform.message.SubAliasStatus;
import com.meizu.cloud.pushsdk.platform.message.SubTagsStatus;
import com.meizu.cloud.pushsdk.platform.message.UnRegisterStatus;
public class AVFlymePushMessageReceiver extends MzPushMessageReceiver {
private final String FLYME_VERDOR = "mz";
public AVFlymePushMessageReceiver() {
}
private void updateAVInstallation(String flymePushId) {
if(!AVUtils.isBlankString(flymePushId)) {
AVInstallation installation = AVInstallation.getCurrentInstallation();
if(!"mz".equals(installation.getString("vendor"))) {
installation.put("vendor", "mz");
}
if(!flymePushId.equals(installation.getString("registrationId"))) {
installation.put("registrationId", flymePushId);
}
String localProfile = installation.getString("deviceProfile");
localProfile = null != localProfile?localProfile:"";
if(!localProfile.equals(AVMixpushManager.flymeDevicePrifile)) {
installation.put("deviceProfile", AVMixpushManager.flymeDevicePrifile);
}
installation.saveInBackground(new SaveCallback() {
public void done(AVException e) {
if(null != e) {
avlog.d("update installation error!");
} else {
avlog.d("flyme push registration successful!");
}
}
});
}
}
public void onRegister(Context context, String s) {
}
public void onMessage(Context context, String s) {
AVNotificationManager.getInstance().processMixPushMessage(s);
}
public void onMessage(Context context, Intent intent) {
}
/** @deprecated */
@Deprecated
public void onUnRegister(Context context, boolean b) {
}
public void onPushStatus(Context context, PushSwitchStatus pushSwitchStatus) {
}
public void onRegisterStatus(Context context, RegisterStatus registerStatus) {
String pushId = registerStatus.getPushId();
if(!AVUtils.isBlankContent(pushId)) {
this.updateAVInstallation(pushId);
}
}
public void onUnRegisterStatus(Context context, UnRegisterStatus unRegisterStatus) {
}
public void onSubTagsStatus(Context context, SubTagsStatus subTagsStatus) {
}
public void onSubAliasStatus(Context context, SubAliasStatus subAliasStatus) {
}
public void onUpdateNotificationBuilder(PushNotificationBuilder pushNotificationBuilder) {
}
public void onNotificationArrived(Context context, String title, String content, String selfDefineContentString) {
}
public void onNotificationClicked(Context context, String title, String content, String selfDefineContentString) {
AVNotificationManager.getInstance().processMixNotification(selfDefineContentString, "com.avos.avoscloud.flyme_notification_action");
}
public void onNotificationDeleted(Context context, String title, String content, String selfDefineContentString) {
}
public void onNotifyMessageArrived(Context context, String message) {
}
}
Metadata
Metadata
Assignees
Labels
No labels