다음을 통해 공유


MockContext.CreatePackageContext(String, PackageContextFlags) Method

Definition

Return a new Context object for the given application name.

[Android.Runtime.Register("createPackageContext", "(Ljava/lang/String;I)Landroid/content/Context;", "GetCreatePackageContext_Ljava_lang_String_IHandler")]
public override Android.Content.Context? CreatePackageContext (string? packageName, Android.Content.PackageContextFlags flags);
[<Android.Runtime.Register("createPackageContext", "(Ljava/lang/String;I)Landroid/content/Context;", "GetCreatePackageContext_Ljava_lang_String_IHandler")>]
override this.CreatePackageContext : string * Android.Content.PackageContextFlags -> Android.Content.Context

Parameters

packageName
String

Name of the application's package.

Returns

Attributes

Exceptions

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