Instrumentation.NewApplication 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 |
|---|---|
| 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
Class: The class used to create an Application object from.
- context
- 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.
Throws: ClassNotFoundException
Throws: IllegalAccessException
Throws: InstantiationException
Android reference for android.app.Instrumentation.newApplication.
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
ClassLoader: The ClassLoader with which to instantiate the object.
- className
- String
String: The name of the class implementing the Application object.
- context
- 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.
Throws: ClassNotFoundException
Throws: IllegalAccessException
Throws: InstantiationException
Android reference for android.app.Instrumentation.newApplication.
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.