Is there a way to get the current Context instance inside a static method?
Context
I\'m looking for that way because I hate saving the \'Context\' instance eac
open class MyApp : Application() { override fun onCreate() { super.onCreate() mInstance = this } companion object { lateinit var mInstance: MyApp fun getContext(): Context? { return mInstance.applicationContext } } }
and get Context like
MyApp.mInstance
or
MyApp.getContext()