io.realm.exceptions.realmexception: running transactions on the ui thread has been disabled. it can be enabled by setting 'realmconfiguration.builder.allowwritesonuithread(true)'.
RealmConfiguration config = new RealmConfiguration.Builder(getApplicationContext()).deleteRealmIfMigrationNeeded().build();
Realm.setDefaultConfiguration(config);