<Android Kotlin: Having a global Context object fo...
# stackoverflow
u
Android Kotlin: Having a global Context object for all activities (best practice) I have a global app settings class as follows: class AppSettings : MultiDexApplication() { override fun onCreate() { super.onCreate() instance = this resourses = applicationContext.resources outputPathCache = cacheDir.absolutePath } companion object { lateinit var instance: AppSettings private set val context: Context get() { return activityContext.get()!! } lateinit var activityContext:...