I am defining default database at the first run then calling the default database i don't why it is asking me to call setDefaultConfuration
when i have already created default.realm file.
here is the declaration:-
boolean isFirstRun = wmbPreference.getBoolean("FIRSTRUN", true);
if (isFirstRun) {
RealmConfiguration config = new RealmConfiguration.Builder(context)
.name(Realm.DEFAULT_REALM_NAME)
.migration(new in.webic.sendify.Details())
.schemaVersion(0)
.build();
realm = realm.getInstance(config);
realm.close();
SharedPreferences.Editor editor = wmbPreference.edit();
editor.putBoolean("FIRSTRUN", false);
editor.commit();
}
realm = Realm.getDefaultInstance();
i am not able to find what wrong i am doing? or there is an alternative way of declaration of realm database?
any help will be appritiated
Thanks