AppComponentFactory.InstantiateProvider(ClassLoader, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Allows application to override the creation of providers.
[Android.Runtime.Register("instantiateProvider", "(Ljava/lang/ClassLoader;Ljava/lang/String;)Landroid/content/ContentProvider;", "GetInstantiateProvider_Ljava_lang_ClassLoader_Ljava_lang_String_Handler", ApiSince=28)]
public virtual Android.Content.ContentProvider InstantiateProvider (Java.Lang.ClassLoader cl, string className);
[<Android.Runtime.Register("instantiateProvider", "(Ljava/lang/ClassLoader;Ljava/lang/String;)Landroid/content/ContentProvider;", "GetInstantiateProvider_Ljava_lang_ClassLoader_Ljava_lang_String_Handler", ApiSince=28)>]
abstract member InstantiateProvider : Java.Lang.ClassLoader * string -> Android.Content.ContentProvider
override this.InstantiateProvider : Java.Lang.ClassLoader * string -> Android.Content.ContentProvider
Parameters
- cl
- ClassLoader
The default classloader to use for instantiation.
- className
- String
The class to be instantiated.
Returns
- Attributes
Remarks
Allows application to override the creation of providers. This can be used to perform things such as dependency injection or class loader changes to these classes.
This method is only intended to provide a hook for instantiation. It does not provide earlier access to the ContentProvider object. The returned object will not be initialized with a Context yet and should not be used to interact with other android APIs.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.