How to get Application from Context
Context#getApplicationContext
will return your Application
instance.
val application : Application = context.applicationContext as Application
Context#getApplicationContext
will return your Application
instance.
val application : Application = context.applicationContext as Application