ContentProviderCompat
class ContentProviderCompat
kotlin.Any | |
↳ | androidx.core.content.ContentProviderCompat |
Helper for accessing features in android.content.ContentProvider
in a backwards compatible fashion.
Summary
Public methods | |
---|---|
static Context |
requireContext(@NonNull provider: ContentProvider) Returns NonNull context associated with given |
Public methods
requireContext
@NonNull static fun requireContext(@NonNull provider: ContentProvider): Context
Returns NonNull context associated with given android.content.ContentProvider
. A provider must be declared in the manifest and created automatically by the system, and context is only available after android.content.ContentProvider#onCreate
is called.
Parameters | |
---|---|
provider |
ContentProvider: The android.content.ContentProvider . |
Return | |
---|---|
Context |
The android.content.Context object associated with the android.content.ContentProvider . |