Skip to content

Instantly share code, notes, and snippets.

@alhazmy13
Last active September 5, 2016 03:58
Show Gist options
  • Save alhazmy13/dd15eb114b2242c761e248c6c8140836 to your computer and use it in GitHub Desktop.
Save alhazmy13/dd15eb114b2242c761e248c6c8140836 to your computer and use it in GitHub Desktop.
// Create a RealmConfiguration that saves the Realm file in the app's "files" directory.
RealmConfiguration realmConfig = new RealmConfiguration.Builder(context).build();
Realm.setDefaultConfiguration(realmConfig);
// Get a Realm instance for this thread
Realm realm = Realm.getDefaultInstance();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment