use of io.realm.android.SecureUserStore in project realm-java by realm.
the class MainActivity method buildSyncConf.
// build SyncConfiguration with a user store to store encrypted Token.
private void buildSyncConf() {
try {
SyncManager.setUserStore(new SecureUserStore(MainActivity.this));
// the rest of Sync logic ...
SyncUser user = createTestUser(0);
String url = "realm://objectserver.realm.io/default";
SyncConfiguration secureConfig = new SyncConfiguration.Builder(user, url).build();
Realm realm = Realm.getInstance(secureConfig);
// ...
} catch (KeyStoreException e) {
e.printStackTrace();
}
}
Aggregations