导航菜单

页面标题

页面副标题

aeroLINE CREW v5.0.1 - ReactNativeFirebaseMessagingHeadlessService.java 源代码

正在查看: aeroLINE CREW v5.0.1 应用的 ReactNativeFirebaseMessagingHeadlessService.java JAVA 源代码文件

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


package io.invertase.firebase.messaging;

import android.content.Intent;
import com.facebook.react.HeadlessJsTaskService;
import com.facebook.react.jstasks.HeadlessJsTaskConfig;
import com.google.firebase.messaging.RemoteMessage;
import io.invertase.firebase.common.ReactNativeFirebaseJSON;
import javax.annotation.Nullable;

public class ReactNativeFirebaseMessagingHeadlessService extends HeadlessJsTaskService {
    private static final String TASK_KEY = "ReactNativeFirebaseMessagingHeadlessTask";
    private static final long TIMEOUT_DEFAULT = 60000;
    private static final String TIMEOUT_JSON_KEY = "messaging_android_headless_task_timeout";

    @Nullable
    protected HeadlessJsTaskConfig getTaskConfig(Intent intent) {
        if (intent.getExtras() == null) {
            return null;
        }
        return new HeadlessJsTaskConfig(TASK_KEY, ReactNativeFirebaseMessagingSerializer.remoteMessageToWritableMap((RemoteMessage) intent.getParcelableExtra("message")), ReactNativeFirebaseJSON.getSharedInstance().getLongValue(TIMEOUT_JSON_KEY, 60000L), true);
    }
}