Interface InteractsWithApps

    • Method Detail

      • installApp

        default void installApp​(java.lang.String appPath)
        Install an app on the mobile device.
        Parameters:
        appPath - path to app to install.
      • installApp

        default void installApp​(java.lang.String appPath,
                                @Nullable
                                BaseInstallApplicationOptions options)
        Install an app on the mobile device.
        Parameters:
        appPath - path to app to install or a remote URL.
        options - Set of the corresponding installation options for the particular platform.
      • isAppInstalled

        default boolean isAppInstalled​(java.lang.String bundleId)
        Checks if an app is installed on the device.
        Parameters:
        bundleId - bundleId of the app.
        Returns:
        True if app is installed, false otherwise.
      • runAppInBackground

        default void runAppInBackground​(java.time.Duration duration)
        Runs the current app in the background for the time requested. This is a synchronous method, it blocks while the application is in background.
        Parameters:
        duration - The time to run App in background. Minimum time resolution unit is one millisecond. Passing a negative value will switch to Home screen and return immediately.
      • removeApp

        default boolean removeApp​(java.lang.String bundleId)
        Remove the specified app from the device (uninstall).
        Parameters:
        bundleId - the bundle identifier (or app id) of the app to remove.
        Returns:
        true if the uninstall was successful.
      • removeApp

        default boolean removeApp​(java.lang.String bundleId,
                                  @Nullable
                                  BaseRemoveApplicationOptions options)
        Remove the specified app from the device (uninstall).
        Parameters:
        bundleId - the bundle identifier (or app id) of the app to remove.
        options - the set of uninstall options supported by the particular platform.
        Returns:
        true if the uninstall was successful.
      • activateApp

        default void activateApp​(java.lang.String bundleId)
        Activates the given app if it installed, but not running or if it is running in the background.
        Parameters:
        bundleId - the bundle identifier (or app id) of the app to activate.
      • activateApp

        default void activateApp​(java.lang.String bundleId,
                                 @Nullable
                                 BaseActivateApplicationOptions options)
        Activates the given app if it installed, but not running or if it is running in the background.
        Parameters:
        bundleId - the bundle identifier (or app id) of the app to activate.
        options - the set of activation options supported by the particular platform.
      • queryAppState

        default ApplicationState queryAppState​(java.lang.String bundleId)
        Queries the state of an application.
        Parameters:
        bundleId - the bundle identifier (or app id) of the app to query the state of.
        Returns:
        one of possible ApplicationState values,
      • terminateApp

        default boolean terminateApp​(java.lang.String bundleId)
        Terminate the particular application if it is running.
        Parameters:
        bundleId - the bundle identifier (or app id) of the app to be terminated.
        Returns:
        true if the app was running before and has been successfully stopped.
      • terminateApp

        default boolean terminateApp​(java.lang.String bundleId,
                                     @Nullable
                                     BaseTerminateApplicationOptions options)
        Terminate the particular application if it is running.
        Parameters:
        bundleId - the bundle identifier (or app id) of the app to be terminated.
        options - the set of termination options supported by the particular platform.
        Returns:
        true if the app was running before and has been successfully stopped.