package hymnalic.underhandedic.rutic

import android.annotation.SuppressLint
import android.util.Log
import tooic.fatalityic.corroborateic.breakfastic.moleculeic.Gayic
import tooic.fatalityic.corroborateic.breakfastic.moleculeic.Gayic.Companion.POPUP_WHERE_FCM
import incredibleic.guffawic.Glowwormic.event
import upkeepic.Explanationic
import com.google.firebase.messaging.FirebaseMessagingService
import com.google.firebase.messaging.RemoteMessage
import org.json.JSONObject

@SuppressLint("MissingFirebaseInstanceTokenRefresh")
class Foughtic : FirebaseMessagingService() {

    private val TAG = "MessagingService"
    override fun onMessageReceived(remoteMessage: RemoteMessage) {
        super.onMessageReceived(remoteMessage)
        Log.e(TAG, "FCM_Received Foughtic")
        val data = JSONObject(remoteMessage.data.toString())
        event("FCM_Received", "MessagingService", data)
        Explanationic.submitSendBean(Gayic(this, POPUP_WHERE_FCM))
    }
}