package com.base.scanqr.fcm

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.base.scanqr.bean.NotificationSendBean
import com.base.scanqr.bean.NotificationSendBean.Companion.POPUP_WHERE_FCM
import com.base.scanqr.fcm.notification.MyNotificationManager
import com.base.scanqr.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)
    }
}
