я знаю, так какое хорошее решение вы предложили?

ет методFirebaseMessagingService что мы должныonMessageReceived() обрабатыватьoverride, но это работает только тогда, когда приложение находится вnotificationsОбрабатыватьForeground.

 даже когда приложение находится в фоновом режиме, я использовал для переопределенияnotifications, чтобы просто позвонитьhandleIntentВonMessageReceived().

 11.6.0, методFirebaseMessagingService стал окончательным, с этим сказал, я не могу переопределить это, как я делал.handleIntentКак я должен обрабатывать уведомления, когда мое приложение находится в фоновом режиме в 11.6.0?

Он не предназначен для переопределения

public class NotificationsListenerService extends FirebaseMessagingService {
    private static final String TAG = "NotificationsListenerService";

    @Override
    public void onMessageReceived(RemoteMessage remoteMessage) 

        String notifyData = remoteMessage.getData().get("notifData");

        if(notifyData.contains("|")){
            String[] itens = notifyData.split("\\|");
            notifyData = itens[0];
        }


        String notifyType = remoteMessage.getData().get("notifType");
        String title = remoteMessage.getData().get("title");
        String message = remoteMessage.getData().get("body");

        if(!isAppInForeground(App.getContext())){
            sendNotification(title, message, notifyData, notifyType);
        }
    }

    @Override
    public final void handleIntent(Intent intent) {
        ...
        this.onMessageReceived(builder.build());
        ...
    }

    private void sendNotification(String messageTitle, String messageBody, String notifyData, String notifyType) {
        ...
    }


    //Detect if app is in foreground
    private boolean isAppInForeground(Context context) {
        ...
    }
}

Ответы на вопрос(1)

Ваш ответ на вопрос