This. MyFirebaseMessagingService is not called when I send notifications from Firebase. This is my code. I have the MyFirebaseInstanceIDService and works properly.
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
String from = remoteMessage.getFrom();
Log.d(TAG, "Mensaje recibido: " + from);
if (remoteMessage.getNotification() != null) {
Log.d(TAG, "Notificacion: " + remoteMessage.getNotification().getBody());
mostratNotificacion(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody());
}
if (remoteMessage.getData().size() > 0) {
Log.d(TAG, "Data: " + remoteMessage.getData());
}
}
and this is part of my manifest