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
Kotlin way:
Manifest:
MyApplication.kt
class MyApplication: Application() { override fun onCreate() { super.onCreate() instance = this } companion object { lateinit var instance: MyApplication private set } }
You can then access the property via MyApplication.instance
MyApplication.instance