Created
January 24, 2020 04:27
-
-
Save vamjakuldip/f18c989ce1befea265bcc4d4495036cc to your computer and use it in GitHub Desktop.
Application Context with Multidex install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vk.android.utils | |
import android.app.Application | |
import android.content.Context | |
import androidx.multidex.MultiDex | |
class VkApplication : Application() { | |
private val TAG = this.javaClass.simpleName | |
override fun onCreate() { | |
super.onCreate() | |
context = this | |
} | |
override fun attachBaseContext(base: Context) { | |
super.attachBaseContext(base) | |
MultiDex.install(base) | |
} | |
companion object { | |
lateinit var context: Context | |
private set | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment