Created
March 27, 2019 09:20
-
-
Save MaryKuz/a8711eeebd87067307a45a7774135b90 to your computer and use it in GitHub Desktop.
Realm database initialization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SimpleRealmApp extends Application { | |
private static SimpleRealmApp instance; | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
instance = this; | |
RealmConfiguration config = new RealmConfiguration.Builder(getApplicationContext()).setModules(new SimpleRealmModule()).build(); | |
Realm.setDefaultConfiguration(config); | |
} | |
public static SimpleRealmApp getInstance() { | |
return instance; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment