正在查看: 95爱播免登录版 v3.1.9 应用的 PushMessageReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 95爱播免登录版 v3.1.9 应用的 PushMessageReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.showself.ui.jpush;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import cn.jpush.android.api.CmdMessage;
import cn.jpush.android.api.CustomMessage;
import cn.jpush.android.api.JPushMessage;
import cn.jpush.android.api.NotificationMessage;
import cn.jpush.android.service.JPushMessageReceiver;
import com.mifeng.ui.R;
import com.showself.ui.NotificationClickReceiver;
import com.showself.utils.Utils;
import com.showself.utils.o;
import com.showself.utils.r0;
import com.tencent.open.SocialConstants;
import com.tencent.smtt.utils.TbsLog;
import me.leolin.shortcutbadger.c;
import org.json.JSONObject;
public class PushMessageReceiver extends JPushMessageReceiver {
private void a(Context context, NotificationMessage notificationMessage) {
try {
Intent L = Utils.L(context, new JSONObject(notificationMessage.notificationExtras).optString("url"));
L.addFlags(268435456);
o.i(context, L, true);
} catch (Exception unused) {
}
}
private void b(Context context, NotificationMessage notificationMessage) {
try {
int optInt = new JSONObject(notificationMessage.notificationExtras).optInt("unread") + r0.d0();
if (optInt > 999) {
optInt = TbsLog.TBSLOG_CODE_SDK_INIT;
}
if (Build.MANUFACTURER.equalsIgnoreCase("Xiaomi")) {
c(context, optInt);
} else {
c.a(context, optInt);
}
} catch (Exception unused) {
}
}
private void c(Context context, int i2) {
NotificationManager notificationManager = (NotificationManager) context.getSystemService("notification");
Notification.Builder deleteIntent = new Notification.Builder(context.getApplicationContext()).setSmallIcon(R.drawable.mifeng).setContentTitle(context.getString(2131689532)).setContentText("您有未读私信消息").setDeleteIntent(PendingIntent.getBroadcast(context.getApplicationContext(), (int) (System.currentTimeMillis() / 1000), new Intent(context, (Class<?>) NotificationClickReceiver.class), 134217728));
deleteIntent.setAutoCancel(true);
Notification notification = Build.VERSION.SDK_INT < 16 ? deleteIntent.getNotification() : deleteIntent.build();
notification.flags = 16;
c.e(context.getApplicationContext(), notification, i2);
notificationManager.notify(0, notification);
if (i2 == 0) {
notificationManager.cancel(0);
}
}
public void onAliasOperatorResult(Context context, JPushMessage jPushMessage) {
super.onAliasOperatorResult(context, jPushMessage);
}
public void onCheckTagOperatorResult(Context context, JPushMessage jPushMessage) {
super.onCheckTagOperatorResult(context, jPushMessage);
}
public void onCommandResult(Context context, CmdMessage cmdMessage) {
String str = "[onCommandResult] " + cmdMessage;
}
public void onConnected(Context context, boolean z) {
String str = "[onConnected] " + z;
}
public void onMessage(Context context, CustomMessage customMessage) {
String str = "[onMessage] " + customMessage;
Intent intent = new Intent("com.jiguang.demo.message");
intent.putExtra(SocialConstants.PARAM_SEND_MSG, customMessage.message);
context.sendBroadcast(intent);
}
public void onMobileNumberOperatorResult(Context context, JPushMessage jPushMessage) {
super.onMobileNumberOperatorResult(context, jPushMessage);
}
public void onMultiActionClicked(Context context, Intent intent) {
String string = intent.getExtras().getString("cn.jpush.android.NOTIFIACATION_ACTION_EXTRA");
if (string == null || string.equals("my_extra1") || string.equals("my_extra2")) {
return;
}
string.equals("my_extra3");
}
public void onNotificationSettingsCheck(Context context, boolean z, int i2) {
super.onNotificationSettingsCheck(context, z, i2);
String str = "[onNotificationSettingsCheck] isOn:" + z + ",source:" + i2;
}
public void onNotifyMessageArrived(Context context, NotificationMessage notificationMessage) {
String str = "[onNotifyMessageArrived] " + notificationMessage;
b(context, notificationMessage);
}
public void onNotifyMessageDismiss(Context context, NotificationMessage notificationMessage) {
String str = "[onNotifyMessageDismiss] " + notificationMessage;
}
public void onNotifyMessageOpened(Context context, NotificationMessage notificationMessage) {
String str = "[onNotifyMessageOpened] " + notificationMessage;
try {
a(context, notificationMessage);
} catch (Throwable unused) {
}
}
public void onRegister(Context context, String str) {
String str2 = "[onRegister] " + str;
}
public void onTagOperatorResult(Context context, JPushMessage jPushMessage) {
super.onTagOperatorResult(context, jPushMessage);
}
}