package com.ddmeng.todorealm;

import android.app.Application;

import com.facebook.stetho.Stetho;
import com.uphyca.stetho_realm.RealmInspectorModulesProvider;

import io.realm.Realm;

public class TodoApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Realm.init(this);
        if (BuildConfig.DEBUG) {
            Stetho.initialize(
                    Stetho.newInitializerBuilder(this)
                            .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
                            .enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
                            .build());
        }
    }
}

@@ -177,16 +177,52 @@
 m.Realm;
+%0Aimport io.realm.RealmConfiguration;
 %0A%0Apublic
@@ -361,16 +361,279 @@
 (this);%0A
+%0A        RealmConfiguration config = new RealmConfiguration.Builder()%0A                .name(%22todo.realm%22)%0A                .schemaVersion(1)%0A                .deleteRealmIfMigrationNeeded()%0A                .build();%0A%0A        Realm.setDefaultConfiguration(config);%0A%0A
         

set default realm configuration