Package 

Class AppsImpl

  • All Implemented Interfaces:
    com.kaspersky.kaspresso.device.apps.Apps

    
    public final class AppsImpl
     implements Apps
                        

    The implementation of the Apps interface.

    • Method Detail

      • install

         Unit install(String apkPath)

        Installs an app via ADB.

        Required Permissions: INTERNET.

        Parameters:
        apkPath - a path to an apk to be installed.
      • installIfNotExists

         Unit installIfNotExists(String packageName, String apkPath)

        Installs an app via ADB only if packageName is not installed

        Required Permissions: INTERNET.

        Parameters:
        packageName - an android package name of the app to be checked.
        apkPath - a path to the apk to be installed.
      • uninstall

         Unit uninstall(String packageName)

        Uninstalls an app via ADB.

        Required Permissions: INTERNET.

        Parameters:
        packageName - an android package name of an app to be deleted.
      • uninstallIfExists

         Unit uninstallIfExists(String packageName)

        Uninstalls an app via ADB only if it installed

        Required Permissions: INTERNET.

        Parameters:
        packageName - an android package name of an app to be deleted.
      • isInstalled

         Boolean isInstalled(String packageName)

        Checks app is installed on device

        Parameters:
        packageName - an android package name of the app to be checked.
      • launch

         Unit launch(String packageName, Uri data)

        Launches an app with given packageName.

        Parameters:
        packageName - the package name of an app to launch.
        data - the data to put to the launch intent.
      • openRecent

         Unit openRecent(String contentDescription)

        Opens the app from the recent list by the description.

        Parameters:
        contentDescription - the description of the app to launch.
      • kill

         Unit kill(String packageName)

        Kills the process of the app by the given packageName.

        Parameters:
        packageName - the package name of the app to be killed.