use of io.realm.RealmConfiguration in project MPAndroidChart by PhilJay.
the class RealmBaseActivity method onResume.
@Override
protected void onResume() {
super.onResume();
// Create a RealmConfiguration that saves the Realm file in the app's "files" directory.
RealmConfiguration realmConfig = new RealmConfiguration.Builder().build();
Realm.setDefaultConfiguration(realmConfig);
mRealm = Realm.getDefaultInstance();
}
use of io.realm.RealmConfiguration in project simple-stack by Zhuinden.
the class DatabaseManager method init.
public void init(Context context) {
Realm.init(context);
RealmConfiguration realmConfiguration = new RealmConfiguration.Builder().deleteRealmIfMigrationNeeded().build();
Realm.setDefaultConfiguration(realmConfiguration);
}
use of io.realm.RealmConfiguration in project app by TourLive.
the class ImportFragment method resetDataToImport.
private void resetDataToImport() throws IOException {
RealmConfiguration config = new RealmConfiguration.Builder().name(REALREAM).deleteRealmIfMigrationNeeded().modules(new RealmModul()).build();
RadioTourApplication.setInstance(config);
}
use of io.realm.RealmConfiguration in project app by TourLive.
the class RadioTourApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
Realm.init(this);
RealmConfiguration config = new RealmConfiguration.Builder().name("radiotour.realm").deleteRealmIfMigrationNeeded().modules(new RealmModul()).build();
Realm.setDefaultConfiguration(config);
realmConfig = config;
Stetho.initialize(Stetho.newInitializerBuilder(this).enableDumpapp(Stetho.defaultDumperPluginsProvider(this)).enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build()).build());
}
use of io.realm.RealmConfiguration in project Neuronizer by djuelg.
the class RepositoryManager method exportRepository.
public static boolean exportRepository(File destination, String activeRealm) {
if (!destination.exists()) {
RealmConfiguration configuration = createConfiguration(activeRealm);
Realm realm = Realm.getInstance(configuration);
realm.writeEncryptedCopyTo(destination, letMeReadImLegit());
realm.close();
return true;
}
return false;
}
Aggregations