Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CHLibrarian/51ff5a783e00df3024d0 to your computer and use it in GitHub Desktop.
Save CHLibrarian/51ff5a783e00df3024d0 to your computer and use it in GitHub Desktop.
ContextHub Application Services Vault Item Update (Android)
// Updating a vault item with the first name "Darin" and adding the tag "employee"
// Update *replaces* a vault record with new contents so you must have a copy of the previous record if you want to make a change to a single value
person.setName("Darin");
VaultProxy<Person> proxy = new VaultProxy<Person>();
proxy.updateDocument(person, Person.class, "B89ECE55-9A3B-4998-AD58-2927F99802B7", new String[]{"kramerica", "employee"}, new VaultCallback<Person>() {
@Override
public void onSuccess(VaultDocument<Person> result) {
Log.d(TAG, result.getDataObject().toString());
}
@Override
public void onFailure(Exception e) {
Log.d(TAG, e.getMessage());
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment