Skip to content

Instantly share code, notes, and snippets.

@Bambina-zz
Last active May 10, 2017 11:18
Show Gist options
  • Save Bambina-zz/3bab0ca31b5c729605df5c7aa403961b to your computer and use it in GitHub Desktop.
Save Bambina-zz/3bab0ca31b5c729605df5c7aa403961b to your computer and use it in GitHub Desktop.
public class MyApplication extends Application {
@Override
public void onCreate(){
super.onCreate();
Realm.init(getApplicationContext());
RealmConfiguration c = new RealmConfiguration.Builder().build();
// Use below if you are in the middle of development and changing your schema.
// RealmConfiguration config = new RealmConfiguration.Builder().deleteRealmIfMigrationNeeded().build();
Realm.setDefaultConfiguration(c);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment