Register a new user
If you wish to register a new user you will have to call the MBurgerAuthTasks.registerUser(…) method.
Be aware that a Nooko user contains these fields, some required, some not required, and some autofilled when registering.
  • (Auto-filled) ID
  • (Required) Name
  • (Required) Surname
  • (Required) Email
  • Phone
  • Image
  • Auxiliar data
  • (Auto-filled) Auth mode
Where Auxiliar data is an arbitrary string you can pass while registering a user.
So registration code will result:
1
private var listener: MBAuthApiRegisterListener
2
private var edt_name, edt_surname, edt_email, edt_password: EditText
3
private var phone: String
4
private var img_uri: Uri
5
private var auxiliar_data: String
6
7
MBurgerAuthTasks.registerUser(applicationContext,
8
listener, //Listener for registration
9
edt_name.getText().toString(), //Name, REQUIRED
10
edt_surname.getText().toString(), //Surname, REQUIRED
11
phone, //Phone number, nullable
12
img_uri, //Image, nullable
13
edt_email.getText().toString(), //Email, REQUIRED
14
edt_password.getText().toString(), //Password REQUIRED
15
auxiliar_data); //Auxiliar data nullable
Copied!
This method won’t return anything less than an error if the email is already taken or any other problem occurred.
To obtain the profile of the user and also to call all the other API with this authorization, you will need to login this user.
Copy link