code: public void registerDeviceWithUserId(String userId, MFPPushResponseListener<String> listener) {
  
      if (isInitialized) {
        this.registerResponseListener = listener;
          setAppForeground(true);
          logger.info("MFPPush:register() - Retrieving senderId from MFPPush server.");
          getSenderIdFromServerAndRegisterInBackground(userId);
      } else {
        logger.error("MFPPush:register() - An error occured while registering for MFPPush service. Push not initialized with call to initialize()");
      }
  
    }
docs: Registers the device for Push notifications with the given alias and
  consumerId
  
  @param listener - Mandatory listener class. When the device is successfully
  registered with Push service the
  {@link MFPPushResponseListener}.onSuccess method is called
  with the deviceId. {@link MFPPushResponseListener}.onFailure
  method is called otherwise
  @param userId   -  The UserId for registration.