ContentProviderCompat

Added in 1.3.0

class ContentProviderCompat


Helper for accessing features in android.content.ContentProvider in a backwards compatible fashion.

Summary

Public functions

java-static Context

Returns NonNull context associated with given android.content.ContentProvider.

Public functions

requireContext

Added in 1.3.0
java-static fun requireContext(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 onCreate is called.

Returns
Context

The android.content.Context object associated with the android.content.ContentProvider.