package com.dumpster.cleaner.business.push.fcm

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.util.Log
import com.dumpster.cleaner.bean.push.NotificationSendBean
import com.dumpster.cleaner.bean.push.NotificationSendBean.Companion.POPUP_WHERE_FCM
import com.dumpster.cleaner.business.helper.EventUtils.event
import com.dumpster.cleaner.business.push.notification.MyNotificationManager

class FcmReceiver : BroadcastReceiver() {

    private val TAG = "FcmReceiver"

    override fun onReceive(context: Context, intent: Intent) {
        Log.e(TAG,"FCM_Received FcmReceiver")
        event("FCM_Received", "FcmReceiver", null)
        MyNotificationManager.submitSendBean(NotificationSendBean(context, POPUP_WHERE_FCM))
    }
}
