Java android.app Instrumentation fields, constructors, methods, implement or subclass

Example usage for Java android.app Instrumentation fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.app Instrumentation.

The text is from its open source code.

Subclass

android.app.Instrumentation has subclasses.
Click this link to see all its subclasses.

Constructor

Method

voidaddMonitor(ActivityMonitor monitor)
Add a new ActivityMonitor that will be checked whenever an activity is started.
ActivityMonitoraddMonitor(IntentFilter filter, ActivityResult result, boolean block)
A convenience wrapper for #addMonitor(ActivityMonitor) that creates an intent filter matching ActivityMonitor for you and returns it.
ActivityMonitoraddMonitor(String cls, ActivityResult result, boolean block)
A convenience wrapper for #addMonitor(ActivityMonitor) that creates a class matching ActivityMonitor for you and returns it.
voidcheckStartActivityResult(int res, Object intent)
ContextgetContext()
Return the Context of this instrumentation's package.
ContextgetTargetContext()
Return a Context for the target application being instrumented.
booleaninvokeContextMenuAction(Activity targetActivity, int id, int flag)
Show the context menu for the currently focused view and executes a particular context menu item.
booleaninvokeMenuActionSync(Activity targetActivity, int id, int flag)
Execute a particular menu item.
ApplicationnewApplication(Class clazz, Context context)
Perform instantiation of the process's Application object.
voidrunOnMainSync(Runnable runner)
Execute a call on the application's main thread, blocking until it is complete.
voidsendCharacterSync(int keyCode)
Higher-level method for sending both the down and up key events for a particular character key code.
voidsendKeyDownUpSync(int key)
Sends an up and down key event sync to the currently focused window.
voidsendPointerSync(MotionEvent event)
Dispatch a pointer event.
voidsendTrackballEventSync(MotionEvent event)
Dispatch a trackball event.
ActivitystartActivitySync(Intent intent)
Start a new activity and wait for it to begin running before returning.
voidwaitForIdleSync()
Synchronously wait for the application to be idle.