package com.base.appzxhy.fcm

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.base.appzxhy.bean.NotificationSendBean
import com.base.appzxhy.bean.NotificationSendBean.Companion.POPUP_WHERE_FCM
import com.base.appzxhy.fcm.notification.MyNotificationManager
import com.base.appzxhy.helper.EventUtils.event

class FcmReceiver : BroadcastReceiver() {

    private val TAG = "FcmReceiver"

    override fun onReceive(context: Context, intent: Intent) {
        event("FCM_Received", "FcmReceiver", null)
        val sendBean = NotificationSendBean(context, POPUP_WHERE_FCM, canSend = { true }, sendSuccess = {})
        MyNotificationManager.submitSendBean(sendBean)
    }
}
