Sdílet prostřednictvím


Instrumentation.NewApplication Method

Definition

Overloads

NewApplication(Class, Context)

Perform instantiation of the process's Application object.

NewApplication(ClassLoader, String, Context)

Perform instantiation of the process's Application object.

NewApplication(Class, Context)

Perform instantiation of the process's Application object.

[Android.Runtime.Register("newApplication", "(Ljava/lang/Class;Landroid/content/Context;)Landroid/app/Application;", "")]
public static Android.App.Application? NewApplication (Java.Lang.Class? clazz, Android.Content.Context? context);
[<Android.Runtime.Register("newApplication", "(Ljava/lang/Class;Landroid/content/Context;)Landroid/app/Application;", "")>]
static member NewApplication : Java.Lang.Class * Android.Content.Context -> Android.App.Application

Parameters

clazz
Class

The class used to create an Application object from.

context
Context

The context to initialize the application with

Returns

The newly instantiated Application object.

Attributes

Remarks

Perform instantiation of the process's Application object. The default implementation provides the normal system behavior.

Java documentation for android.app.Instrumentation.newApplication(java.lang.Class<?>, android.content.Context).

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

NewApplication(ClassLoader, String, Context)

Perform instantiation of the process's Application object.

[Android.Runtime.Register("newApplication", "(Ljava/lang/ClassLoader;Ljava/lang/String;Landroid/content/Context;)Landroid/app/Application;", "GetNewApplication_Ljava_lang_ClassLoader_Ljava_lang_String_Landroid_content_Context_Handler")]
public virtual Android.App.Application? NewApplication (Java.Lang.ClassLoader? cl, string? className, Android.Content.Context? context);
[<Android.Runtime.Register("newApplication", "(Ljava/lang/ClassLoader;Ljava/lang/String;Landroid/content/Context;)Landroid/app/Application;", "GetNewApplication_Ljava_lang_ClassLoader_Ljava_lang_String_Landroid_content_Context_Handler")>]
abstract member NewApplication : Java.Lang.ClassLoader * string * Android.Content.Context -> Android.App.Application
override this.NewApplication : Java.Lang.ClassLoader * string * Android.Content.Context -> Android.App.Application

Parameters

cl
ClassLoader

The ClassLoader with which to instantiate the object.

className
String

The name of the class implementing the Application object.

context
Context

The context to initialize the application with

Returns

The newly instantiated Application object.

Attributes

Exceptions

Remarks

Perform instantiation of the process's Application object. The default implementation provides the normal system behavior.

Java documentation for android.app.Instrumentation.newApplication(java.lang.ClassLoader, java.lang.String, android.content.Context).

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