package com.bkp.minerva;

import android.app.Application;
import android.content.Context;
import com.karumi.dexter.Dexter;

/**
 * Custom Application class.
 */
public class Minerva extends Application {
    /**
     * Static instance to (CAREFULLY) allow getting Application Context anywhere.
     */
    private static Minerva instance;

    @Override
    public void onCreate() {
        super.onCreate();
        // Stash application context.
        instance = this;
        // Init Dexter.
        Dexter.initialize(this);
    }

    /**
     * Get the application context. DO NOT use the context returned by this method in methods which affect the UI (such
     * as when inflating a layout, for example).
     * @return Application context.
     */
    public static Context getAppCtx() {
        return instance.getApplicationContext();
    }

}

@@ -115,16 +115,75 @@
 .Dexter;
+%0Aimport io.realm.Realm;%0Aimport io.realm.RealmConfiguration;
 %0A%0A/**%0A *
@@ -581,16 +581,382 @@
 (this);%0A
+        // Set up Realm.%0A        setupRealm();%0A    %7D%0A%0A    /**%0A     * Set up Realm's default configuration.%0A     */%0A    private void setupRealm() %7B%0A        RealmConfiguration config = new RealmConfiguration.Builder(this)%0A                .name(%22minerva.realm%22)%0A                .schemaVersion(0)%0A                .build();%0A        Realm.setDefaultConfiguration(config);%0A
     %7D%0A%0A 
@@ -1264,17 +1264,16 @@
 text();%0A
+
     %7D%0A
-%0A
 %7D%0A

Set a default realm config