Package io.appium.java_client.android
Class AndroidMobileCommandHelper
- java.lang.Object
- 
- io.appium.java_client.MobileCommand
- 
- io.appium.java_client.android.AndroidMobileCommandHelper
 
 
- 
 public class AndroidMobileCommandHelper extends MobileCommand This util class helps to prepare parameters of Android-specific JSONWP commands.
- 
- 
Field Summary- 
Fields inherited from class io.appium.java_client.MobileCommandACTIVATE_APP, CLOSE_APP, commandRepository, COMPARE_IMAGES, CURRENT_ACTIVITY, END_TEST_COVERAGE, EXECUTE_DRIVER_SCRIPT, EXECUTE_GOOGLE_CDP_COMMAND, FINGER_PRINT, GET_ALLSESSION, GET_CLIPBOARD, GET_CURRENT_PACKAGE, GET_DEVICE_TIME, GET_DISPLAY_DENSITY, GET_EVENTS, GET_NETWORK_CONNECTION, GET_PERFORMANCE_DATA, GET_SESSION, GET_SETTINGS, GET_STRINGS, GET_SUPPORTED_PERFORMANCE_DATA_TYPES, GET_SYSTEM_BARS, GSM_CALL, GSM_SIGNAL, GSM_VOICE, HIDE_KEYBOARD, INSTALL_APP, IS_APP_INSTALLED, IS_KEYBOARD_SHOWN, IS_LOCKED, LAUNCH_APP, LOCK, LOG_EVENT, LONG_PRESS_KEY_CODE, NETWORK_SPEED, OPEN_NOTIFICATIONS, PERFORM_MULTI_TOUCH, PERFORM_TOUCH_ACTION, POWER_AC_STATE, POWER_CAPACITY, PRESS_KEY_CODE, PULL_FILE, PULL_FOLDER, PUSH_FILE, QUERY_APP_STATE, REMOVE_APP, REPLACE_VALUE, RESET, RUN_APP_IN_BACKGROUND, SEND_SMS, SET_CLIPBOARD, SET_NETWORK_CONNECTION, SET_SETTINGS, SET_VALUE, SHAKE, START_ACTIVITY, START_RECORDING_SCREEN, STOP_RECORDING_SCREEN, TERMINATE_APP, TOGGLE_AIRPLANE_MODE, TOGGLE_DATA, TOGGLE_LOCATION_SERVICES, TOGGLE_WIFI, TOUCH_ID, TOUCH_ID_ENROLLMENT, UNLOCK
 
- 
 - 
Constructor SummaryConstructors Constructor Description AndroidMobileCommandHelper()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>currentActivityCommand()Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>currentPackageCommand()Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>fingerPrintCommand(int fingerPrintId)Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>getDisplayDensityCommand()Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>getNetworkConnectionCommand()Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>getPerformanceDataCommand(java.lang.String packageName, java.lang.String dataType, int dataReadTimeout)returns the resource usage information of the application.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>getSupportedPerformanceDataTypesCommand()returns the information type of the system state which is supported to read as like cpu, memory, network traffic, and battery.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>getSystemBarsCommand()Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>gsmCallCommand(java.lang.String phoneNumber, GsmCallActions gsmCallActions)Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>gsmSignalStrengthCommand(GsmSignalStrength gsmSignalStrength)Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>gsmVoiceCommand(GsmVoiceState gsmVoiceState)Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>isLockedCommand()Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>networkSpeedCommand(NetworkSpeed networkSpeed)Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>openNotificationsCommand()Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>powerACCommand(PowerACState powerACState)Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>powerCapacityCommand(int percent)Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>replaceElementValueCommand(org.openqa.selenium.remote.RemoteWebElement remoteWebElement, java.lang.String value)Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>sendSMSCommand(java.lang.String phoneNumber, java.lang.String message)Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>setConnectionCommand(long bitMask)Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>toggleAirplaneCommand()Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>toggleDataCommand()Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>toggleLocationServicesCommand()Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>toggleWifiCommand()Deprecated.static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>>unlockCommand()Deprecated.- 
Methods inherited from class io.appium.java_client.MobileCommandcompareImagesCommand, deleteC, getC, getIsDeviceLockedCommand, getSettingsCommand, hideKeyboardCommand, hideKeyboardCommand, isKeyboardShownCommand, lockDeviceCommand, longPressKeyCodeCommand, longPressKeyCodeCommand, postC, prepareArguments, prepareArguments, pressKeyCodeCommand, pressKeyCodeCommand, pushFileCommand, setSettingsCommand, setSettingsCommand, startRecordingScreenCommand, stopRecordingScreenCommand, unlockDeviceCommand
 
- 
 
- 
- 
- 
Method Detail- 
currentActivityCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> currentActivityCommand() Deprecated.This method forms aMapof parameters for the getting of the current activity.- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
currentPackageCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> currentPackageCommand() Deprecated.This method forms aMapof parameters for the getting of the current package.- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
getSupportedPerformanceDataTypesCommandpublic static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> getSupportedPerformanceDataTypesCommand() returns the information type of the system state which is supported to read as like cpu, memory, network traffic, and battery.- Returns:
- output - array like below [cpuinfo, batteryinfo, networkinfo, memoryinfo]
 
 - 
getPerformanceDataCommandpublic static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> getPerformanceDataCommand(java.lang.String packageName, java.lang.String dataType, int dataReadTimeout)returns the resource usage information of the application. the resource is one of the system state which means cpu, memory, network traffic, and battery.- Parameters:
- packageName- the package name of the application
- dataType- the type of system state which wants to read. It should be one of the supported performance data types, the return value of the function "getSupportedPerformanceDataTypes"
- dataReadTimeout- the number of attempts to read
- Returns:
- table of the performance data, The first line of the table represents the type of data. The remaining lines represent the values of the data. in case of battery info : [[power], [23]] in case of memory info : [[totalPrivateDirty, nativePrivateDirty, dalvikPrivateDirty, eglPrivateDirty, glPrivateDirty, totalPss, nativePss, dalvikPss, eglPss, glPss, nativeHeapAllocatedSize, nativeHeapSize], [18360, 8296, 6132, null, null, 42588, 8406, 7024, null, null, 26519, 10344]] in case of network info : [[bucketStart, activeTime, rxBytes, rxPackets, txBytes, txPackets, operations, bucketDuration,], [1478091600000, null, 1099075, 610947, 928, 114362, 769, 0, 3600000], [1478095200000, null, 1306300, 405997, 509, 46359, 370, 0, 3600000]] in case of network info : [[st, activeTime, rb, rp, tb, tp, op, bucketDuration], [1478088000, null, null, 32115296, 34291, 2956805, 25705, 0, 3600], [1478091600, null, null, 2714683, 11821, 1420564, 12650, 0, 3600], [1478095200, null, null, 10079213, 19962, 2487705, 20015, 0, 3600], [1478098800, null, null, 4444433, 10227, 1430356, 10493, 0, 3600]] in case of cpu info : [[user, kernel], [0.9, 1.3]]
 
 - 
getDisplayDensityCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> getDisplayDensityCommand() Deprecated.This method forms aMapof parameters to retrieve the display density of the Android device.- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
getNetworkConnectionCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> getNetworkConnectionCommand() Deprecated.This method forms aMapof parameters for the getting of a network connection value.- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
getSystemBarsCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> getSystemBarsCommand() Deprecated.This method forms aMapof parameters to retrieve visibility and bounds information of the status and navigation bars.- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
isLockedCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> isLockedCommand() Deprecated.This method forms aMapof parameters for the finger print authentication invocation.- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
fingerPrintCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> fingerPrintCommand(int fingerPrintId) Deprecated.This method forms aMapof parameters for the finger print authentication invocation.- Parameters:
- fingerPrintId- finger prints stored in Android Keystore system (from 1 to 10)
- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
openNotificationsCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> openNotificationsCommand() Deprecated.This method forms aMapof parameters for the notification opening.- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
setConnectionCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> setConnectionCommand(long bitMask) Deprecated.This method forms aMapof parameters for the setting of device network connection.- Parameters:
- bitMask- The bitmask of the desired connection
- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
toggleLocationServicesCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> toggleLocationServicesCommand() Deprecated.This method forms aMapof parameters for the toggling of location services.- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
unlockCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> unlockCommand() Deprecated.This method forms aMapof parameters for the element.- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
replaceElementValueCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> replaceElementValueCommand(org.openqa.selenium.remote.RemoteWebElement remoteWebElement, java.lang.String value)Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
- remoteWebElement- an instance which contains an element ID
- value- a new value
- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
sendSMSCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> sendSMSCommand(java.lang.String phoneNumber, java.lang.String message)Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
- phoneNumber- The phone number of message sender
- message- The message content
- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
gsmCallCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> gsmCallCommand(java.lang.String phoneNumber, GsmCallActions gsmCallActions)Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
- phoneNumber- The phone number of message sender
- gsmCallActions- One of available GSM call actions
- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
gsmSignalStrengthCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> gsmSignalStrengthCommand(GsmSignalStrength gsmSignalStrength) Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
- gsmSignalStrength- One of available GSM signal strength
- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
gsmVoiceCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> gsmVoiceCommand(GsmVoiceState gsmVoiceState) Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
- gsmVoiceState- One of available GSM voice state
- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
networkSpeedCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> networkSpeedCommand(NetworkSpeed networkSpeed) Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
- networkSpeed- One of possible NETWORK_SPEED values
- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
powerCapacityCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> powerCapacityCommand(int percent) Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
- percent- A number in range [0, 4]
- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
powerACCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> powerACCommand(PowerACState powerACState) Deprecated.This method forms aMapof parameters for the element value replacement. It is used against input elements- Parameters:
- powerACState- One of available power AC state
- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
toggleWifiCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> toggleWifiCommand() Deprecated.This method forms aMapof parameters for the toggling of wifi.- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
toggleAirplaneCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> toggleAirplaneCommand() Deprecated.This method forms aMapof parameters for the toggle airplane mode.- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 - 
toggleDataCommand@Deprecated public static java.util.Map.Entry<java.lang.String,java.util.Map<java.lang.String,?>> toggleDataCommand() Deprecated.This method forms aMapof parameters for the toggle data.- Returns:
- a key-value pair. The key is the command name. The value is a Mapcommand arguments.
 
 
- 
 
-