导航菜单

页面标题

页面副标题

Oolka v2.4.42 - ReactNativeFirebaseMessagingReceiver.java 源代码

正在查看: Oolka v2.4.42 应用的 ReactNativeFirebaseMessagingReceiver.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package io.invertase.firebase.messaging;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Parcelable;
import com.facebook.react.HeadlessJsTaskService;
import com.google.firebase.messaging.RemoteMessage;
import io.invertase.firebase.app.ReactNativeFirebaseApp;
import io.invertase.firebase.common.ReactNativeFirebaseEventEmitter;
import io.invertase.firebase.common.SharedUtils;
import java.util.HashMap;

public class ReactNativeFirebaseMessagingReceiver extends BroadcastReceiver {
    public static HashMap<String, RemoteMessage> a = new HashMap<>();

    @Override
    public void onReceive(Context context, Intent intent) {
        if (ReactNativeFirebaseApp.a() == null) {
            ReactNativeFirebaseApp.b(context.getApplicationContext());
        }
        if (intent.getExtras() == null) {
            return;
        }
        RemoteMessage remoteMessage = new RemoteMessage(intent.getExtras());
        ReactNativeFirebaseEventEmitter i = ReactNativeFirebaseEventEmitter.i();
        if (remoteMessage.getNotification() != null) {
            a.put(remoteMessage.getMessageId(), remoteMessage);
            p.a().b().c(remoteMessage);
        }
        if (SharedUtils.c(context)) {
            i.o(ReactNativeFirebaseMessagingSerializer.h(remoteMessage, Boolean.FALSE));
            return;
        }
        try {
            Intent intent2 = new Intent(context, (Class<?>) ReactNativeFirebaseMessagingHeadlessService.class);
            intent2.putExtra("message", (Parcelable) remoteMessage);
            if (context.startService(intent2) != null) {
                HeadlessJsTaskService.c(context);
            }
        } catch (IllegalStateException unused) {
        }
    }
}