package com.base.locationsharewhite.fcm;

import android.annotation.SuppressLint;

import androidx.annotation.NonNull;

import com.base.locationsharewhite.helper.EventUtils;
import com.base.locationsharewhite.utils.LogEx;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;

@SuppressLint("MissingFirebaseInstanceTokenRefresh")
public class MessagingService extends FirebaseMessagingService {

    private static final String TAG = "MessagingService";

    @Override
    public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {
        super.onMessageReceived(remoteMessage);
        LogEx.INSTANCE.logDebug(TAG, "onMessageReceived", false);
        EventUtils.INSTANCE.event("FCM_Received", null, null, false);

        NotificationUiUtil.INSTANCE.sendNotificationIfCan(this, PopupConstObject.POPUP_WHERE_FCM, null);
    }


}