How do I start a preinstalled in the middle of an app automation test session?

How do I start a preinstalled in the middle of an app automation test session?

Hi Tim,

You can do it using the startActivity function of the Appium driver. Example:

        Activity activity = new Activity("com.android.chrome", "com.google.android.apps.chrome.Main");
        activity.setAppWaitPackage("com.android.chrome");
        activity.setAppWaitActivity("com.google.android.apps.chrome.Main");
        driver.startActivity(activity);

This example displays the opening of Chrome app.