Java Code Examples for android.support.multidex.MultiDex

The following are top voted examples for showing how to use android.support.multidex.MultiDex. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: GitHub   File: AndroidApplication.java   View source code 6 votes vote down vote up
/**
 * install multiDex before install tinker
 * so we don't need to put the tinker lib classes in the main dex
 *
 * @param base
 */
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onBaseContextAttached(Context base) {
    super.onBaseContextAttached(base);
    sContext = getApplication();
    //you must install multiDex whatever tinker is installed!
    MultiDex.install(base);

    TinkerManager.setTinkerApplicationLike(this);

    TinkerManager.initFastCrashProtect();
    //should set before tinker is installed
    TinkerManager.setUpgradeRetryEnable(true);

    //optional set logIml, or you can use default debug log
    TinkerInstaller.setLogIml(new MyLogImp());
    //installTinker after load multiDex
    //or you can put com.tencent.tinker.** to main dex
    TinkerManager.installTinker(this);
    Tinker tinker = Tinker.with(getApplication());
}
 
Example 2
Project: GitHub   File: SampleApplicationLike.java   View source code 6 votes vote down vote up
/**
 * install multiDex before install tinker
 * so we don't need to put the tinker lib classes in the main dex
 *
 * @param base
 */
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onBaseContextAttached(Context base) {
    super.onBaseContextAttached(base);
    //you must install multiDex whatever tinker is installed!
    MultiDex.install(base);

    SampleApplicationContext.application = getApplication();
    SampleApplicationContext.context = getApplication();
    TinkerManager.setTinkerApplicationLike(this);

    TinkerManager.initFastCrashProtect();
    //should set before tinker is installed
    TinkerManager.setUpgradeRetryEnable(true);

    //optional set logIml, or you can use default debug log
    TinkerInstaller.setLogIml(new MyLogImp());

    //installTinker after load multiDex
    //or you can put com.tencent.tinker.** to main dex
    TinkerManager.installTinker(this);
    Tinker tinker = Tinker.with(getApplication());
}
 
Example 3
Project: TinkerDemo   File: BaseApplicationLike.java   View source code 6 votes vote down vote up
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onBaseContextAttached(Context base) {
    super.onBaseContextAttached(base);
    //you must install multiDex whatever tinker is installed!
    MultiDex.install(base);

    SampleApplicationContext.application = getApplication();
    SampleApplicationContext.context = getApplication();
    TinkerManager.setTinkerApplicationLike(this);

    TinkerManager.initFastCrashProtect();
    TinkerManager.setUpgradeRetryEnable(true);

    TinkerInstaller.setLogIml(new MyLogImp());

    TinkerManager.installTinker(this);
}
 
Example 4
Project: PLDroidRTCStreaming   File: ConferenceEntryActivity.java   View source code 6 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_rtc_conference_config);

    setTitle(R.string.rtc_only);

    mCodecRadioGroup = (RadioGroup) findViewById(R.id.CodecRadioGroup);
    mRTCModeRadioGroup = (RadioGroup) findViewById(R.id.RTCModeGroup);

    mCheckBoxBeauty = (CheckBox) findViewById(R.id.CheckboxBeauty);
    mCheckBoxDebugMode = (CheckBox) findViewById(R.id.CheckboxDebugMode);
    mCheckBoxAudioLevel = (CheckBox) findViewById(R.id.CheckboxAudioLevel);
    mCheckboxEnableStats = (CheckBox) findViewById(R.id.CheckboxEnableStats);

    mRoomEditText = (EditText) findViewById(R.id.RoomNameEditView);
    SharedPreferences preferences = getSharedPreferences(getString(R.string.app_name), Context.MODE_PRIVATE);
    mRoomEditText.setText(preferences.getString("roomName", ""));

    MultiDex.install(this);
}
 
Example 5
Project: Coin-Tracker   File: BaseApplication.java   View source code 6 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();

    MultiDex.install(this);

    Logger.addLogAdapter(new AndroidLogAdapter() {
        @Override
        public boolean isLoggable(int priority, String tag) {
            return BuildConfig.DEBUG;
        }
    });

    Hawk.init(getBaseContext()).build();

    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
            .setDefaultFontPath("fonts/lato_regular.ttf")
            .setFontAttrId(R.attr.fontPath)
            .build()
    );
}
 
Example 6
Project: GCSApp   File: GApplication.java   View source code 6 votes vote down vote up
@Override
    public void onCreate() {
        MultiDex.install(this);
        super.onCreate();
        instance = this;
        aCache = ACache.get(this);
        DemoHelper.getInstance().init(this);
        SDKInitializer.initialize(this);
        EMClient.getInstance().init(this, initChatOptions());
        EMClient.getInstance().setDebugMode(true);
        initRedPacket();
//        F.setLog(false);
//        //崩溃处理
        CrashHandlerUtil crashHandlerUtil = CrashHandlerUtil.getInstance();
        crashHandlerUtil.init(this);
        crashHandlerUtil.setCrashTip("很抱歉,程序出现异常,即将退出!");
        Config.DEBUG = true;
        initUM();
        QueuedWork.isUseThreadPool = false;
        UMShareAPI.get(this);
    }
 
Example 7
Project: zxing_qrcode_demo   File: TotalApplication.java   View source code 6 votes vote down vote up
@Override
    public void onCreate() {
        super.onCreate();

        MultiDex.install(getApplicationContext());

//        if (AppUtils.isNamedProcess(getApplicationContext(), getPackageName())) {
        //androidtools init
        AndroidTools.init(getApplicationContext(), BuildConfig.LOG_TAG);
        //UMeng init
        String umeng_appkey = AppUtils.getMetaDataString(getApplicationContext(), "UMENG_APPKEY");
        String umeng_channel = AppUtils.getMetaDataString(getApplicationContext(), "UMENG_CHANNEL");
        MobclickAgent.UMAnalyticsConfig config = new MobclickAgent.UMAnalyticsConfig(getApplicationContext(), umeng_appkey, umeng_channel);
        MobclickAgent.startWithConfigure(config);
        MobclickAgent.setDebugMode(BuildConfig.INNER_TEST);
        MobclickAgent.setCatchUncaughtExceptions(true);
        MobclickAgent.openActivityDurationTrack(false);
//        }
    }
 
Example 8
Project: InstantAppStarter   File: App.java   View source code 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    appComponent = createAppComponent();
    MultiDex.install(this);
    init();
}
 
Example 9
Project: Viajes   File: HotelApp.java   View source code 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    MultiDex.install(this);
    //init firebase
    FirebaseDatabase.getInstance().setPersistenceEnabled(true);

    Fresco.initialize(this, ImagePipelineConfigFactory.getImagePipelineConfig(this));
}
 
Example 10
Project: RX_Demo   File: TotalApplication.java   View source code 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    mContext = getApplicationContext();

    MultiDex.install(getApplicationContext());

    baseComponent = DaggerBaseComponent.builder()
            .baseModule(new BaseModule())
            .build();

    BaseApi.init();

    //AndroidTools initialization
    AndroidTools.init(getApplicationContext(), getLogTag());

    //OkHttpClient initialization
    MyOkHttpClient.init(getApplicationContext());

    //Fresco initialization
    Fresco.initialize(getApplicationContext(),
            ImagePipelineFactory.imagePipelineConfig(getApplicationContext()
                    , MyOkHttpClient.provideOkHttpClient()
                    , getCacheDir().getAbsolutePath()));

    //UMeng initialization
    MobclickAgent.setDebugMode(BuildConfig.IS_TEST);
    MobclickAgent.setCatchUncaughtExceptions(true);
    MobclickAgent.openActivityDurationTrack(false);

    mActivityManager = new ActivityManager();
}
 
Example 11
Project: Selector   File: MyApplication.java   View source code 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    context = this.getApplicationContext();
    Fresco.initialize(this);
    CookieJarImpl cookieJar1 = new CookieJarImpl(new MemoryCookieStore());
    OkHttpClient okHttpClient = new OkHttpClient.Builder()
            .connectTimeout(10000L, TimeUnit.MILLISECONDS)
            .readTimeout(10000L, TimeUnit.MILLISECONDS)
            .addInterceptor(new LoggerInterceptor("TAG"))
            .cookieJar(cookieJar1)
            .build();
    OkHttpUtils.initClient(okHttpClient);




    MultiDex.install(this);

    //开启debug模式,方便定位错误,具体错误检查方式可以查看http://dev.umeng.com/social/android/quick-integration的报错必看,正式发布,请关闭该模式
    //Config.DEBUG = true;

    initXY(context);
    //Thread.setDefaultUncaughtExceptionHandler(crashHandler);
    SharedPreferencesUtil.init(context,"deepSP",MODE_PRIVATE);
    /**
     * 初始化imageloader
     */
    ImageLoaderConfiguration configuration = ImageLoaderConfiguration.createDefault(this);
    ImageLoader.getInstance().init(configuration);
}
 
Example 12
Project: POCenter   File: BaseApplication.java   View source code 5 votes vote down vote up
/**
 * tinker
 * @param base
 */
@Override
public void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    //you must install multiDex whatever tinker is installed!
    MultiDex.install(base);
}
 
Example 13
Project: PimPam   File: BaseActivity.java   View source code 5 votes vote down vote up
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    MultiDex.install(this);
    progressBar = new ProgressDialog(this);
    progressBar.setIndeterminate(true);


}
 
Example 14
Project: AndroidBackendlessChat   File: AppObj.java   View source code 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();

    // Setting the version name of the sdk, This data will be added 
    // to the user metadata and will help in future when doing code updating.
    BDefines.BAppVersion = BuildConfig.VERSION_NAME;
    
    MultiDex.install(this);




    // Logging tool.
    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
    } else {
        Timber.plant(new Timber.HollowTree());
    }


    // Android chat SDK init!
    ChatSDKUiHelper.initDefault();
    BNetworkManager.init(getApplicationContext());
    // Adapter init.
    BChatcatNetworkAdapter adapter = new BChatcatNetworkAdapter(getApplicationContext());
    BNetworkManager.sharedManager().setNetworkAdapter(adapter);
}
 
Example 15
Project: chromium-net-for-android   File: ChromiumMultiDexInstaller.java   View source code 5 votes vote down vote up
/**
 *  Installs secondary dexes if possible/necessary.
 *
 *  Isolated processes (e.g. renderer processes) can't load secondary dex files on
 *  K and below, so we don't even try in that case.
 *
 *  In release builds of app apks (as opposed to test apks), this is a no-op because:
 *    - multidex isn't necessary in release builds because we run proguard there and
 *      thus aren't threatening to hit the dex limit; and
 *    - calling MultiDex.install, even in the absence of secondary dexes, causes a
 *      significant regression in start-up time (crbug.com/525695).
 *
 *  @param context The application context.
 */
@VisibleForTesting
public static void install(Context context) {
    if (!BuildConfig.isMultidexEnabled()) return;

    // TODO(jbudorick): Back out this version check once support for K & below works.
    // http://crbug.com/512357
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP
            && !shouldInstallMultiDex(context)) {
        Log.i(TAG, "Skipping multidex installation: not needed for process.");
    } else {
        MultiDex.install(context);
        Log.i(TAG, "Completed multidex installation.");
    }
}
 
Example 16
Project: editor-sql   File: EditorApplication.java   View source code 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();

    MultiDex.install(this);
    DBCore.initDB(this);
    DataFactory.init(this);
}
 
Example 17
Project: chat-sdk-android-push-firebase   File: AppObj.java   View source code 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();

    // Setting the version name of the sdk, This data will be added 
    // to the user metadata and will help in future when doing code updating.
    BDefines.BAppVersion = BuildConfig.VERSION_NAME;
    
    MultiDex.install(this);




    // Logging tool.
    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
    } else {
        Timber.plant(new Timber.HollowTree());
    }


    // Android chat SDK init!
    ChatSDKUiHelper.initDefault();
    BNetworkManager.init(getApplicationContext());
    // Adapter init.
    BChatcatNetworkAdapter adapter = new BChatcatNetworkAdapter(getApplicationContext());
    BNetworkManager.sharedManager().setNetworkAdapter(adapter);
}
 
Example 18
Project: letv   File: LetvApplication.java   View source code 5 votes vote down vote up
protected void attachBaseContext(Context base) {
    PluginHelper.getInstance().applicationAttachBaseContext(base);
    super.attachBaseContext(base);
    MultiDex.install(this);
    HotFix.init(this);
    HotFix.loadPatch(this, getFilesDir());
}
 
Example 19
Project: HutHelper   File: MApplication.java   View source code 5 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    //初始化多dex配置
    MultiDex.install(this);
    Beta.installTinker();
}
 
Example 20
Project: Aurora   File: BaseApplication.java   View source code 5 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(base);
    this.mAppDelegate = new AppDelegate(base);
    this.mAppDelegate.attachBaseContext(base);
}
 
Example 21
Project: KTools   File: KApplication.java   View source code 5 votes vote down vote up
@Override
    public void onCreate() {
        super.onCreate();

        MultiDex.install(this);

        enableStrictMode();

        if (BuildConfig.DEBUG) {
            new Thread(
                    new Runnable() {
                        @Override
                        public void run() {
                            Stetho.initializeWithDefaults(KApplication.this);
                        }
                    }
            ).start();

        }

//        if (LeakCanary.isInAnalyzerProcess(this)) {
//            return;
//        }
//        LeakCanary.install(this);

        King.init(this);

        initARouter();

    }
 
Example 22
Project: CommonFramework   File: LoadMultidexActivity.java   View source code 5 votes vote down vote up
@Override
protected Object doInBackground(Object[] objects) {
    try {
        MultiDex.install(getApplication());
        Logger.d("loadDex install finish");
        BaseApplication.INSTANCE.installFinish(getApplication());
    } catch (Exception e) {
        e.printStackTrace();
    }
    return null;
}
 
Example 23
Project: CommonFramework   File: BaseApplication.java   View source code 5 votes vote down vote up
/**
 * 5.0 以下手机需要处理
 * 5.0 以上使用ART机制,Android系统自己处理
 *
 * @param context
 */
@Override
protected void attachBaseContext(Context context) {
    super.attachBaseContext(context);
    Logger.i("attachBaseContext");
    if (!quickStart() && Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
        if (needWait(context)) {
            waitForDexOpt(context);
        }
        MultiDex.install(this);
    }
}
 
Example 24
Project: HotFixDemo   File: TinkerApplicationLike.java   View source code 5 votes vote down vote up
private void initTinker(Context base) {
    // tinker需要你开启MultiDex
    MultiDex.install(base);

    TinkerManager.setTinkerApplicationLike(this);
    // 设置全局异常捕获
    TinkerManager.initFastCrashProtect();
    //开启升级重试功能(在安装Tinker之前设置)
    TinkerManager.setUpgradeRetryEnable(true);
    //设置Tinker日志输出类
    TinkerInstaller.setLogIml(new MyLogImp());
    //安装Tinker(在加载完multiDex之后,否则你需要将com.tencent.tinker.**手动放到main dex中)
    TinkerManager.installTinker(this);
    mTinker = Tinker.with(getApplication());
}
 
Example 25
Project: MultiDexSample   File: LoadResActivity.java   View source code 5 votes vote down vote up
@Override
protected Object doInBackground(Object[] params) {
    try {
        MultiDex.install(getApplication());
        Log.d("loadDex", "install finish");
        ((MyApp) getApplication()).installFinish(getApplication());

        Log.d("loadDex", "LoadResActivity  install  end used  : " + (System.currentTimeMillis() - loadoptStart) + "ms");

    } catch (Exception e) {
        Log.e("loadDex", e.getLocalizedMessage());

    }
    return null;
}
 
Example 26
Project: MultiDexSample   File: MyApp.java   View source code 5 votes vote down vote up
@Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        Log.d("loadDex", "App attachBaseContext ");
        String currentProcessName = getCurProcessName(this);
        if (!TextUtils.isEmpty(currentProcessName)) {
            if (currentProcessName.contains(":pushservice") || currentProcessName.contains(":daemon")) {
                if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
                    Log.d("loadDex", "App attachBaseContext current process : " + currentProcessName);
                    remoteInstallStartTime = System.currentTimeMillis();
                    MultiDex.install(this);
                    Log.d("loadDex", "App attachBaseContext current install used : " + (System.currentTimeMillis() - remoteInstallStartTime) + "ms");
                    return;
                }
            }
        }

//        if (!TextUtils.isEmpty(currentProcessName)) {
//            if (currentProcessName.contains(":x5webviewinit")) {
//                Log.d("x5webviewinit", "App attachBaseContext current process : " + currentProcessName);
//                return;
//            }
//        }
        if (!quickStart() && Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {//>=5.0的系统默认对dex进行oat优化
            if (needWait(base)) {
                Log.d("loadDex", "enter needwait ");
                waitForDexopt(base);
            }
            long startTime = System.currentTimeMillis();
            Log.d("loadDex", "App MultiDex.install start  " + startTime);

            MultiDex.install(this);
            endTime = System.currentTimeMillis();
            Log.d("loadDex", "App MultiDex.install used " + (endTime - startTime) + "ms");
        }
        Log.d("loadDex", "attachBaseContext " + System.currentTimeMillis());
    }
 
Example 27
Project: boohee_v5.6   File: MyApplication.java   View source code 5 votes vote down vote up
public void onBaseContextAttached(Context base) {
    super.onBaseContextAttached(base);
    MultiDex.install(base);
    TinkerManager.setTinkerApplicationLike(this);
    TinkerManager.initFastCrashProtect();
    TinkerManager.setUpgradeRetryEnable(true);
    TinkerInstaller.setLogIml(new OneTinkerLogImp());
    TinkerManager.installTinker(this);
}
 
Example 28
Project: phonk   File: App.java   View source code 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();

    MultiDex.install(this);

    Timer2.start();
    Timer2.stamp("start");
    Timer2.stamp("MultiDex.install");

    myLifecycleHandler = new MyLifecycleHandler();
    Timer2.stamp("MyLifecycleHandler");

    registerActivityLifecycleCallbacks(myLifecycleHandler);
    Timer2.stamp("registerActivityLifecycleCallbacks");

    // Fabric.with(this, new Crashlytics());

    /*
    final Fabric fabric = new Fabric.Builder(this)
            .kits(new Crashlytics())
            .logger(new DefaultLogger(Log.VERBOSE))
            .debuggable(true)
            .build();

    Fabric.with(fabric);
    */

    if(!(Thread.getDefaultUncaughtExceptionHandler() instanceof PhonkExceptionHandler)) {
        Thread.setDefaultUncaughtExceptionHandler(new PhonkExceptionHandler());
    }
}
 
Example 29
Project: PlayAndroid   File: App.java   View source code 5 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    Log.d(TAG, "attachBaseContext: " + base.toString());
    MultiDex.install(this);
    ContextDelegate.initContext(base);
}
 
Example 30
Project: KingTV   File: App.java   View source code 5 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);

    MultiDex.install(base);
    Beta.installTinker();
}
 
Example 31
Project: AppFirCloud   File: TotalApplication.java   View source code 5 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    mContext = getApplicationContext();

    MultiDex.install(getApplicationContext());

    baseComponent = DaggerBaseComponent.builder()
            .baseModule(new BaseModule())
            .build();

    BaseApi.init();

    //AndroidTools initialization
    FormatStrategy formatStrategy = PrettyFormatStrategy.newBuilder()
            .tag(getLogTag())
            .build();
    AndroidTools.init(getApplicationContext(), formatStrategy, Logger.DEBUG);

    //OkHttpClient initialization
    MyOkHttpClient.init(getApplicationContext());

    //Fresco initialization
    Fresco.initialize(getApplicationContext(),
            ImagePipelineFactory.imagePipelineConfig(getApplicationContext()
                    , MyOkHttpClient.provideOkHttpClient()
                    , getCacheDir().getAbsolutePath()));

    //UMeng initialization
    MobclickAgent.setDebugMode(BuildConfig.IS_TEST);
    MobclickAgent.setCatchUncaughtExceptions(true);
    MobclickAgent.openActivityDurationTrack(false);

    mActivityManager = new ActivityManager();
}
 
Example 32
Project: RLibrary   File: RApplication.java   View source code 5 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    app = this;
    /*65535限制*/
    MultiDex.install(this);
}
 
Example 33
Project: HotFixDemo   File: SampleApplicationLike.java   View source code 5 votes vote down vote up
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onBaseContextAttached(Context base) {
    super.onBaseContextAttached(base);
    // you must install multiDex whatever tinker is installed!
    MultiDex.install(base);
    // 安装tinker
    Beta.installTinker(this);
}
 
Example 34
Project: HotFixDemo   File: MyApplication.java   View source code 5 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    // you must install multiDex whatever tinker is installed!
    MultiDex.install(mContext);
    // 安装tinker
    // 此接口仅用于反射Application方式接入。
    Beta.installTinker();
}
 
Example 35
Project: Unofficial-Ups   File: UpcApplication.java   View source code 4 votes vote down vote up
@Override
public void attachBaseContext(Context base) {
    MultiDex.install(base);
    super.attachBaseContext(base);
}
 
Example 36
Project: NotifyTools   File: PoemApp.java   View source code 4 votes vote down vote up
@Override
protected void attachBaseContext(Context base) {
  super.attachBaseContext(base);
  MultiDex.install(this);
}
 
Example 37
Project: GitHub   File: App.java   View source code 4 votes vote down vote up
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}
 
Example 38
Project: GitHub   File: App.java   View source code 4 votes vote down vote up
protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
}
 
Example 39
Project: tinkerpatch-andresguard-sample   File: SampleApplication.java   View source code 4 votes vote down vote up
@Override
public void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    //you must install multiDex whatever tinker is installed!
    MultiDex.install(base);
}
 
Example 40
Project: hypertrack-live-android   File: MyApplication.java   View source code 4 votes vote down vote up
@Override
public void onCreate() {
    super.onCreate();
    MultiDex.install(this   );

    if (LeakCanary.isInAnalyzerProcess(this)) {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }

    LeakCanary.install(this);

    try {
        if (!HTTextUtils.isEmpty(ApiKey.getApiKey(this))) {
            Fabric.with(this, new Crashlytics());
        }
    } catch (Exception e) {
        e.printStackTrace();
    }

    // Initialize HyperTrack SDK
    HyperTrack.initialize(this.getApplicationContext(), BuildConfig.HYPERTRACK_PK);
    HyperTrack.enableMockLocations(true);
    HyperTrack.disablePersistentNotification(true);

    // Initialize Branch.io
    Branch.getAutoInstance(this);

    // (NOTE: IFF current Build Variant is DEBUG)
    // Initialize Stetho to debug Databases
    DevDebugUtils.installStetho(this);
    // Enable HyperTrack Debug Logging
    DevDebugUtils.setHyperLogLevel(Log.VERBOSE);
    // Log HyperTrack SDK Version
    DevDebugUtils.sdkVersionMessage();
}