1

How can I update a user data like username and password in syncano using android programming as a syntax ?

Vini.g.fer
  • 11,639
  • 16
  • 61
  • 90

1 Answers1

1

This is taken from tests of Syncano android library.

Going from the start of user creation:

User newUser = new User("username", "password");
Response<User> responseCreateUser = syncano.registerUser(newUser).send();
user = responseCreateUser.getData();

Now you can update his password:

user.setPassword("new password");
Response<User> responseUpdateUser = syncano.updateUser(user).send();

Updating username works in the same way. You can find a lot of examples and use cases in the tests, located under https://github.com/Syncano/syncano-android/tree/master/library/src/test/java/com/syncano/library/tests