Created
June 10, 2021 23:27
-
-
Save Nyame123/b4fd102ca88591768a495446f86ef752 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ExampleContentProvider: ContentProvider() { | |
... | |
override fun query(...): Cursor { | |
val appContext = context?.applicationContext ?: throw IllegalStateException() | |
val hiltEntryPoint = | |
EntryPointAccessors.fromApplication(appContext, ExampleContentProviderEntryPoint::class.java) | |
val analyticsService = hiltEntryPoint.analyticsService() | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment