package com.zxdemo.service

import android.annotation.SuppressLint
import com.google.firebase.messaging.FirebaseMessagingService
import com.google.firebase.messaging.RemoteMessage
import com.swiftcleaner.chovey.model.bean.Global.NOTIFICATION_WHERE_FCM
import com.zxdemo.ZxApplication
import com.zxdemo.http.ZxHttp
import com.zxdemo.notity.NotificationUtils

@SuppressLint("MissingFirebaseInstanceTokenRefresh")
class FcmService : FirebaseMessagingService() {
    override fun onMessageReceived(message: RemoteMessage) {
        ZxHttp.getHttpReportInterface("FCM_Received", "", null)
        NotificationUtils.sendNotification(ZxApplication.context, NOTIFICATION_WHERE_FCM)
    }
}