Skip to content

Instantly share code, notes, and snippets.

@calindotgabriel
Created January 23, 2017 13:30
Show Gist options
  • Save calindotgabriel/08ce25ba1bdbcbd4bd9092760c6d9e55 to your computer and use it in GitHub Desktop.
Save calindotgabriel/08ce25ba1bdbcbd4bd9092760c6d9e55 to your computer and use it in GitHub Desktop.
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
RealmConfiguration realmConfiguration = new RealmConfiguration.Builder(this)
.name(Realm.DEFAULT_REALM_NAME)
.schemaVersion(0)
.deleteRealmIfMigrationNeeded()
.build();
Realm.setDefaultConfiguration(realmConfiguration);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment