Android Access Context/ContentResolver in ViewModel

August 31, 2020
class TestViewModel(application: Application) : AndroidViewModel(application) {
    
    private val context by lazy {
        application.applicationContext
    }
    
    private val contentResolver by lazy { 
        application.contentResolver
    }
}
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.