How to create new user with user_metadata properties?

I’m trying to signup a new user on an Android device. I have a form with four fields like first_name, last_name, email, password. I already looked at the Android quickstart (Auth0 Android SDK Quickstarts: Login) and I’m using the following code:

authenticationClient.createUser(email, password, "", "Username-Password-Authentication").start(callback)

I do not see possibility to pass the custom parameters like first_name and last_name in your Android SDK, but in API documentation I see you have such possibility:

https://auth0.com/docs/api/authentication#signup

In iOS sdk you can also call createUser with userMetadata but on the Android SDK is not possible to do this:

On IOS:

Auth0.authentication().createUser( 
      email: dataModel.email, 
      username: nil, 
      password: dataModel.password, 
      connection: "Username-Password-Authentication", 
     userMetadata:  
           "given_name": dataModel.firstName, 
           "family_name": dataModel.lastName 
      ]
) .start ...

Am I missing something?

Assuming a correctly configured authentication client is available in the client variable you should be able to do the following in order to create the user with additional user_metadata properties:

// Define your custom fields
Map<String, Object> metadata = new HashMap<>();
metadata.put("language", "pt");

// Define the additional parameters, adding the user_metadata
Map<String, Object> params = new HashMap<>();
params.put("user_metadata", metadata);

client
  .createUser("user@example.com", "secret", "db-connection-name")
  .addParameters(params)
  .start(new BaseCallback<DatabaseUser, AuthenticationException>() {
      @Override
      public void onSuccess(DatabaseUser user) {
        // ...
      }

      @Override
      public void onFailure(AuthenticationException error) {
        // ...
      }
  });