Sync activity (FR)

Perfecto Command

mobile:activity:sync

Purpose

Verifies that the Android package or activity has started on the device. At least one of the package or activity parameters must be provided.

Parameters

Name Type Possible Values Description
timeout Integer
The time, in seconds, to wait for the package or activity to start.
Default - 20 seconds
package String
The Android application identifier.
Example - com.sec.android.app.camera
activity String
The activity name.
Example - .Camera
Note: Use the mobile:device:info function while running the activity, to retrieve the currentActivity and currentPackage values to use with this function.

At least one of the package or activity parameters must be provided.

Return Value

String - "true" or "false"

Exceptions

None

Examples

Copy

Java sample

Map<String, Object> params = new HashMap<>();
params.put("package", "com.google.android.keep");
params.put("activity", ".BrowseActivity");
String model = (String) driver.executeScript("mobile:activity:sync", params);
Copy

C# sample

Dictionary<String, Object> pars = new Dictionary<String, Object>();
pars.Add("package", "com.google.android.keep");
pars.Add("activity", ".BrowseActivity");
String model = (String) driver.ExecuteScript("mobile:activity:sync", pars);