Start Activity

Start an Android activity by providing package name and activity name

Example Usage

// Java
driver.startActivity(new Activity("com.example", "ActivityName"));

# Python
self.driver.start_activity("com.example", "ActivityName");

// Javascript
// webdriver.io example
driver.startActivity("com.example", "ActivityName");



[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/activity/start-activity.yml)
// wd example
await driver.startActivity({
  appPackage: "com.example",
  appActivity: "ActivityName"
});

# Ruby
# ruby_lib example
start_activity app_package: "com.example", app_activity: "ActivityName"


[//]: # (DO NOT EDIT THIS FILE! This is an auto-generated file. Editing for this document happens in /commands-yml/commands/device/activity/start-activity.yml)
# ruby_lib_core example
@driver.start_activity app_package: "com.example", app_activity: "ActivityName"

# PHP
$driver->startActivity(array('appPackage' => 'com.example',
                             'appActivity' => 'ActivityName'));

// C#
// TODO C# sample

Support

Appium Server

Platform Driver Platform Versions Appium Version Driver Version
iOS XCUITest None None None
UIAutomation None None None
Android Espresso ?+ 1.9.0+ All
UiAutomator2 ?+ 1.6.0+ All
UiAutomator 4.2+ All All
Mac Mac None None None
Windows Windows None None None

Appium Clients

Language Support Documentation
Java All appium.github.io
Python All github.com
Javascript (WebdriverIO) All
Javascript (WD) All github.com
Ruby All www.rubydoc.info
PHP All github.com
C# All github.com

HTTP API Specifications

Endpoint

POST /wd/hub/session/:session_id/appium/device/start_activity

URL Parameters

name description
session_id ID of the session to route the command to

JSON Parameters

name type description
appPackage string Name of the package
appActivity string Name of the activity
appWaitPackage string Automation will begin after this package starts
intentAction string Intent action which will be used to start activity
intentCategory string Intent category which will be used to start activity
intentFlags string Flags that will be used to start activity
optionalIntentArguments string Additional intent arguments that will be used to start activity
dontStopAppOnReset boolean Should the app stop on reset

Response

null

See Also