code: public void onMessageReceived(RemoteMessage remoteMessage) {
  
  		if (LoggerUtils.isEnabled()) {
  			StringBuilder builder = new StringBuilder();
  			builder.append("Message received. ");
  			builder.append("from: ");
  			builder.append(remoteMessage.getFrom());
  
  			if (remoteMessage.getMessageType() != null) {
  				builder.append(", ");
  				builder.append("message type: ");
  				builder.append(remoteMessage.getMessageType());
  			}
  
  			if (remoteMessage.getData() != null & !remoteMessage.getData().isEmpty()) {
  				builder.append(", ");
  				builder.append("data: ");
  				builder.append(remoteMessage.getData());
  			}
  			LOGGER.info(builder.toString());
  		}
  
  		FcmMessageResolver fcmResolver = AbstractFcmAppModule.get().getFcmMessageResolver();
  		if (fcmResolver != null) {
  			FcmMessage fcmMessage = null;
  			try {
  				fcmMessage = fcmResolver.resolve(remoteMessage);
  			} catch (Exception e) {
  				AbstractApplication.get().getExceptionHandler().logHandledException("Error when resolving FCM message", e);
  				return;
  			}
  
  			if (fcmMessage != null) {
  				try {
  					fcmMessage.handle(remoteMessage);
  				} catch (Exception e) {
  					AbstractApplication.get().getExceptionHandler().logHandledException("Error when handling FCM message", e);
  				}
  			} else {
  				LOGGER.warn("The FCM message was not resolved");
  			}
  		} else {
  			LOGGER.warn("A FCM message was received, but not resolved is configured");
  		}
  
  		for (FcmEventsListener fcmEventsListener : FcmContext.getFcmEventsListeners()) {
  			try {
  				fcmEventsListener.onMessageReceived(remoteMessage);
  			} catch (Exception e) {
  				AbstractApplication.get().getExceptionHandler().logHandledException(e);
  			}
  		}
  	}
docs: Called when message is received. Since Android O, have a guaranteed life cycle limited to 10 seconds for this method execution