RenamingDelegatingContext.ProviderWithRenamedContext 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.
Overloads
| Name | Description |
|---|---|
| ProviderWithRenamedContext(Class, Context, String) |
Creates a content provider attached to a renaming context without access to existing prefixed files and databases. |
| ProviderWithRenamedContext(Class, Context, String, Boolean) |
Creates a content provider attached to a renaming context with the specified access to existing files and databases. |
ProviderWithRenamedContext(Class, Context, String)
Creates a content provider attached to a renaming context without access to existing prefixed files and databases.
[Android.Runtime.Register("providerWithRenamedContext", "(Ljava/lang/Class;Landroid/content/Context;Ljava/lang/String;)Landroid/content/ContentProvider;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T extends android.content.ContentProvider" })]
public static Java.Lang.Object? ProviderWithRenamedContext(Java.Lang.Class? contentProvider, Android.Content.Context? c, string? filePrefix);
[<Android.Runtime.Register("providerWithRenamedContext", "(Ljava/lang/Class;Landroid/content/Context;Ljava/lang/String;)Landroid/content/ContentProvider;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T extends android.content.ContentProvider" })>]
static member ProviderWithRenamedContext : Java.Lang.Class * Android.Content.Context * string -> Java.Lang.Object
Parameters
- contentProvider
- Class
The Java class of the content provider to create, with an accessible parameterless constructor.
- c
- Context
The base context used by the provider's renaming context.
- filePrefix
- String
The prefix added to database and file names.
Returns
The new content provider, exposed as a Object, with its test context attached.
- Attributes
Remarks
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.
Applies to
ProviderWithRenamedContext(Class, Context, String, Boolean)
Creates a content provider attached to a renaming context with the specified access to existing files and databases.
[Android.Runtime.Register("providerWithRenamedContext", "(Ljava/lang/Class;Landroid/content/Context;Ljava/lang/String;Z)Landroid/content/ContentProvider;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T extends android.content.ContentProvider" })]
public static Java.Lang.Object? ProviderWithRenamedContext(Java.Lang.Class? contentProvider, Android.Content.Context? c, string? filePrefix, bool allowAccessToExistingFilesAndDbs);
[<Android.Runtime.Register("providerWithRenamedContext", "(Ljava/lang/Class;Landroid/content/Context;Ljava/lang/String;Z)Landroid/content/ContentProvider;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T extends android.content.ContentProvider" })>]
static member ProviderWithRenamedContext : Java.Lang.Class * Android.Content.Context * string * bool -> Java.Lang.Object
Parameters
- contentProvider
- Class
The Java class of the content provider to create, with an accessible parameterless constructor.
- c
- Context
The base context used by the provider's renaming context.
- filePrefix
- String
The prefix added to database and file names.
- allowAccessToExistingFilesAndDbs
- Boolean
true to make existing files and databases with this prefix accessible through the context; false to expose only files and databases created through the context.
Returns
The new content provider, exposed as a Object, with its test context attached.
- Attributes
Remarks
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.