正在查看: Pulsar v1.0.0 应用的 ReactNativeFirebaseMessagingReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Pulsar v1.0.0 应用的 ReactNativeFirebaseMessagingReceiver.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package io.invertase.firebase.messaging;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.facebook.react.HeadlessJsTaskService;
import com.google.firebase.messaging.b1;
import java.util.HashMap;
public class ReactNativeFirebaseMessagingReceiver extends BroadcastReceiver {
private static final String a = "RNFirebaseMsgReceiver";
static HashMap<String, b1> b = new HashMap<>();
@Override
public void onReceive(Context context, Intent intent) {
Log.d(a, "broadcast received for message");
if (io.invertase.firebase.app.a.getApplicationContext() == null) {
io.invertase.firebase.app.a.setApplicationContext(context.getApplicationContext());
}
b1 b1Var = new b1(intent.getExtras());
io.invertase.firebase.common.g sharedInstance = io.invertase.firebase.common.g.getSharedInstance();
if (b1Var.getNotification() != null) {
b.put(b1Var.getMessageId(), b1Var);
u.getInstance().getMessagingStore().storeFirebaseMessage(b1Var);
}
if (io.invertase.firebase.common.o.isAppInForeground(context)) {
sharedInstance.sendEvent(r.remoteMessageToEvent(b1Var, Boolean.FALSE));
return;
}
try {
Intent intent2 = new Intent(context, (Class<?>) ReactNativeFirebaseMessagingHeadlessService.class);
intent2.putExtra(com.xly.af.http.req.a.k, b1Var);
if (context.startService(intent2) != null) {
HeadlessJsTaskService.acquireWakeLockNow(context);
}
} catch (IllegalStateException e) {
Log.e(a, "Background messages only work if the message priority is set to 'high'", e);
}
}
}