Class SdkCliCommandFactory


  • public final class SdkCliCommandFactory
    extends Object
    This helper class is used to retrieve the correct implementation of the adb shell and the Android SDK tools commands for the given device API level respective for the SDK version.
    • Method Detail

      • getAdbShellCommandForAPILevel

        public static AdbShellCommands getAdbShellCommandForAPILevel​(int deviceAPILevel)
        Retrieve the correct AdbShellCommands for the given API-Level of the device where the commands should run.
        Parameters:
        deviceAPILevel - Android API-Level for the target device
        Returns:
        an object of an class implementing the AdbShellCommands interface to retrieve the correct adb shell commands for the given API-level
      • getCommandsForSdk

        public static SdkToolsCommands getCommandsForSdk​(AndroidSdk androidSdk)
        Retrieve the correct SdkCommands for the given Android SDK.
        Parameters:
        androidSdk - SDK tools to extract the current version and retrieve the correct commands
        Returns:
        an object of an class implementing the SdkToolsCommands interface to retrieve the correct tools commands for the given SDK
      • getCommandsForSdk

        public static SdkToolsCommands getCommandsForSdk​(String sdkToolsVersion)
        Retrieve the correct SdkCommands for the given SDK Tools major version.
        Parameters:
        sdkToolsVersion - SDK Tools version, to retrieve the correct commands
        Returns:
        an object of an class implementing the SdkToolsCommands interface to retrieve the correct tools commands for the given SDK version