Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CHLibrarian/1c46b3e99cc3842390e9 to your computer and use it in GitHub Desktop.
Save CHLibrarian/1c46b3e99cc3842390e9 to your computer and use it in GitHub Desktop.
ContextHub Application Services Vault Item Retrieve by Keypath (Android)
// Get all vault documents with the tag "sample" and match "name = 'Cosmo Kramer'"
VaultProxy<Person> proxy = new VaultProxy<Person>();
proxy.listDocuments("name", "Cosmo Kramer", new String[]{"sample"}, Person.class, new VaultListingCallback<Person>() {
@Override
public void onSuccess(VaultDocument<Person>[] result) {
for(VaultDocument<Person> document : result) {}
Log.d(TAG, document.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