AutoTouch Document

Fit for v3.5.4-1 and above

AutoTouch is a “Macro” toll that “record” and “replay” your “touch” and “click” on the mobile device. It simulates human operation by running Lua script. You can make scripts by recording or writing by hand, a series of extension functions are provided to realize more complex automatic operations, such as: win gold coins by automatically hitting monsters in game, batch edit operations, automatic program testing.

AutoTouch runs on the jailbroken Apple devices, you can install it through Cydia. AutoTouch supports recording for the operations including touch, physical key pressing. In addition, it provides some extension functions like touch, screen shot, image matching, app run/kill.  In addition, extension functions are provided including: touch, screen shot, color searching, picture matching, and application on/off. Meanwhile, a script store is available. You can download and buy scripts from this store, or sell your scripts there.


Usage


How to install?


How to record?

Created with Raphaël 2.1.2Common stateCommon statePopup control panelPopup control panelRecordingRecordingHold volume - buttonClick on "Record"Hold volume - button again

How to play?

Created with Raphaël 2.1.2Common stateCommon statePopup control panelPopup control panelPopup play settingsPopup play settingsPlayingPlayingHold volume - buttonSelect a script to playClick on "Play Now"Hold volume - button again
Created with Raphaël 2.1.2Common stateCommon statePopup control panelPopup control panelPopup play settingsPopup play settingsReady to play stateReady to play statePlayingPlayingHold volume - buttonSelect a script to playClick on "Play Later"Press volume - buttonPress volume - button againPress volume - buttonPress volume - button againHold volume - button again

How to pre-set the play settings?


How to take a screenshot?


How to write a script?


How to use the “Function Helper” when you write the script?


How to write and manage the scripts on the computer?


How to encrypt the scripts?


How to release your script to the store?


How to download and buy the script from the store?


How to buy the license?


Script


Basis

You can learn how to use Lua language from here:《Lua Official Reference Manual

Develop Tool

LuaStudio is aprofessional development environment for debugging Lua script in your applications. It's familiar and fast and you'll wonder how you ever worked without it.


Coordinate and Size Mechanism

In the versions prior to AutoTouch v3.5.2, the coordinate and size mechanism uses iOS Dot Matrix Mechanism. “Pixel Point Mechanism” is used from this version. Namely, the size and coordinate are measured upon the physical pixel point.

For example, in the old “iOS Dot Matrix Mechanism, iPhone 6 Plus’s screen size is 414*736 for the size is the result that the pixel size divides the scaling size of retina screen in this mechanism. Namely, iPhone 6 Plus’s actual pixel resolution ratio is 1242*2208, and the zoom factor is 3. Then, in iOS Dot Matrix mechanism, the screen size is (1242÷3)x(2208÷3). However, in the Pixel Point Mechanism applied after v3.5.2, the coordinate is measured directly and simply upon the size of the pixel point. The pixel point size is used to set the touch coordinate, search color, and match picture. The zoom factor of retina screen is no more considered.

The statement of old SCREEN_RESOLUTION in the beginning of the old script can be identified automatically for adaption. For example, the statement, SCREEN_RESOLUTION=414*736 in the script of iPhone 6 Plus recorded before, can be identified and processed automatically to adapt to the change of the size mechanism.


Extension Functions

Extension functions are used to extend Lua language. Thus, the device can simulate some human abilities of operating the mobile phone. Moreover, extension functions also support functions including: screenshot, color searching, color matching, and picture matching.


touchDown(id, x, y)

Press the coordinate (x,y) on the screen.

Parameters

Parameter Type Specification
id Integer Finger ID. is used to mark a finger in single-touch or multi-touch.
x Float x-coordinate on the screen
y Float y-coordinate on the screen

Return
None

Examples

  1. -- Press by one finger at coordinate (100,200).
  2. touchDown(0, 100, 200);
  3. -- Press by three fingers at three locations on the screen.
  4. touchDown(0, 100, 200);
  5. touchDown(1, 200, 300);
  6. touchDown(2, 300, 400);
  7. -- Implement a tap function
  8. function tap(x, y)
  9. touchDown(0, x, y);
  10. usleep(16000);
  11. touchUp(0, x, y);
  12. end
  13. -- Tap at (100, 200)
  14. tap(100, 200);

touchMove(id, x, y)

Move the finger to coordinate (x,y).

Parameters

Parameter Type Specification
id Integer Finger ID. is used to mark a finger in single-touch or multi-touch.
x Float x-coordinate on the screen
y Float y-coordinate on the screen

Return
None

Examples

  1. -- Press by one finger at coordinate (100,200) and move the finger to coordinate (200,200).
  2. touchDown(0, 100, 200);
  3. usleep(16000);
  4. touchMove(0, 200, 200);
  5. -- Press by three fingers at three locations on the screen and move to new location.
  6. touchDown(0, 100, 200);
  7. touchDown(1, 200, 300);
  8. touchDown(2, 300, 400);
  9. usleep(16000);
  10. touchMove(0, 150, 250);
  11. touchMove(1, 250, 350);
  12. touchMove(2, 350, 450);

touchUp(id, x, y)

Lift the finger from coordinate (x,y)

Parameters

Parameter Type Specification
id Integer Finger ID. is used to mark a finger in single-touch or multi-touch.
x Float x-coordinate on the screen
y Float y-coordinate on the screen

Return
None

Examples

  1. -- Click the screen once by one finger at coordinate (100,200).
  2. touchDown(0, 100, 200);
  3. usleep(16000);
  4. touchUp(0, 100, 200);
  5. -- Press by three fingers at three locations on the screen, move to new location, and then lift the finger.
  6. touchDown(0, 100, 200);
  7. touchDown(1, 200, 300);
  8. touchDown(2, 300, 400);
  9. usleep(16000);
  10. touchMove(0, 150, 250);
  11. touchMove(1, 250, 350);
  12. touchMove(2, 350, 450);
  13. usleep(16000);
  14. touchUp(0, 150, 250);
  15. touchUp(1, 250, 350);
  16. touchUp(2, 350, 450);

keyDown(keyType)

Simulate the pressing of physical key.

Parameters

Parameter Type Specification
keyType Integer Physical key identification. Now you can use these physical keys.

Return
None

Examples

  1. -- Simulate the pressing of Home Key.
  2. keyDown(KEY_TYPE.HOME_BUTTON);
  3. -- How to simulate a key pressing?
  4. function keyPress(keyType)
  5. keyDown(keyType);
  6. usleep(10000);
  7. keyDown(keyUp);
  8. end
  9. keyPress(KEY_TYPE.HOME_BUTTON);
  10. -- How to simulate a screen lock function?
  11. function lockScreen()
  12. keyDown(KEY_TYPE.POWER_BUTTON);
  13. keyUp(KEY_TYPE.POWER_BUTTON);
  14. end
  15. -- How to simulate a screen unlock function?
  16. function unlockScreen()
  17. keyDown(KEY_TYPE.POWER_BUTTON);
  18. keyUp(KEY_TYPE.POWER_BUTTON);
  19. usleep(1000000);
  20. local w, h = getScreenResolution();
  21. local x = 10;
  22. local gap = 120;
  23. touchDown(0, x, 200);
  24. while x < w do
  25. x = x + gap;
  26. usleep(16000);
  27. touchMove(0, x, 200);
  28. end
  29. touchUp(0, x, 200);
  30. end

keyUp(keyType)

Simulate the lifting of physical key.

Parameters

Parameter Type Specification
keyType Integer Physical key identification. Now you can use these physical keys.

Return
None

Examples

  1. -- Simulate the action of pressing and lifting Home Key.
  2. keyDown(KEY_TYPE.HOME_BUTTON);
  3. usleep(10000);
  4. keyUp(KEY_TYPE.HOME_BUTTON);

getColor(x, y)

Get the color value of the pixel point of the specified coordinate on current screen.

Parameters

Parameter Type Specification
x Float x-coordinate on the screen
y Float y-coordinate on the screen

Return

Return Type Specification
color Integer Integer color value of the pixel point

Examples

  1. local color = getColor(100, 200);
  2. alert(string.format("Pixel color is :%d", color));
  3. -- Pop up color: 16777215

getColors(locations)

Get the color values of the pixel points of the specified coordinates on current screen.

Parameters

Parameter Type Specification
locations table A grouo of coordinates, just as {{x1,y1},{x2,y2},{x3,y4}}

Return

Return Type Specification
colors table Colors gotten with corresponding order.

Examples

  1. local result = getColors({{100, 200}, {200, 300}, {300, 400}});
  2. for i, v in pairs(result) do
  3. log(string.format("Gotten color:%d", v));
  4. end

findColor(color, count, region)

Search the coordinates of the pixel points matching the specified color on current screen.

Parameters

Parameter Type Specification
color Integer Matched color value.
count Integer The number refers to how many matched pixel points is found at most. 0 is default setting, which shows all matching points are found. 1 refers to only the first matching pixel point is found. 2 refers to only the first two pixel points are found. The less the number is, the faster the speed is.
region table You only search the result in the specified area. This area is the table type including four values {x, y, width, height}. The four values respectively represent the coordinate x, coordinate y, width, and height of the rectangular area. {100,100,200,200} is an example. If you do not want to specify the area, just input nil.

Return values

Return value Type Specification
locations table Coordinates of matched pixel points. For example: {{x1, y1}, {x2, y2}, ...}

Example

  1. -- Example 1:
  2. local result = findColor(0x0000ff, 2, nil);
  3. for i, v in pairs(result) do
  4. log(string.format("Found pixel: x:%f, y:%f", v[1], v[2]));
  5. end
  6. -- Example 2:
  7. local result = findColor(0x00ddff, 0, {100, 50, 200, 200});
  8. for i, v in pairs(result) do
  9. log(string.format("Found pixel: x:%f, y:%f", v[1], v[2]));
  10. end
  11. -- Example 3:
  12. local region = {100, 50, 200, 200};
  13. local result = findColor(0x00ddff, 0, region);
  14. for i, v in pairs(result) do
  15. log(string.format("Found pixel: x:%f, y:%f", v[1], v[2]));
  16. end

Internal Implementation

  1. function findColor(color, count, region)
  2. return findColors({{color,0,0}}, count, region);
  3. end

findColors(colors, count, region)

Search all rectangular areas matching “specified color and their corresponding location and return the coordinate of the pixel point matching the first color in the rectangular area. This function has the search efficiency and availability far beyond findImage. For example, you need not match the whole key picture, but only match the anchors’ color and their corresponding location on the key. You can specify the number of the results by count parameter. 0 refers to all, 1 refers to the first one, and 2 refers to the first tow. region parameter can specify the search area, which is the table type {x,y,width, height}. You only input nil if no data is specified. 

This function can use the “auxiliary” tool in the “Extension Function” of the script-editing interface to select the anchors’ colors from the screenshot and get their corresponding location to the function’s parameter automatically.

The coordinate of the pixel point pointed by the arrow is the coordinate of the return value.

IMG_0361.PNG-101.9kB

Parameters

Parameter Type Specification
colors table Include some color and their corresponding location, such as:{{0x00ddff,0,0}, {0x00eeff,10,10}, {0x0000ff,0,20}}. The small table in the big table includes 3 values: the first is the color value. The second and the third are the corresponding locations of the colors to the first color. The corresponding location of the first color’s table is always (0,0). {0x00ddff,0,0} is an example. The location values of the successive colors are their locations corresponding to the first color. The matched rectangular area can be found on the screen upon these colors and corresponding location relation.
count Integer The number refers to how many matched pixel points is found at most. 0 is default setting, which shows all matching points are found. 1 refers to only the first matching pixel point is found. 2 refers to only the first two pixel points are found. The less the number is, the faster the speed is.
region table You only search the result in the specified area. This area is the table type including four values {x, y, width, height}. The four values respectively represent the coordinate x, coordinate y, width, and height of the rectangular area. {100,100,200,200} is an example. If you do not want to specify the area, just input nil.

Return values

Return value Type Specification
locations table The coordinate of the first color matched in the found rectangular area, including {{x1, y1}, {x2, y2}, ...}

Examples

  1. -- Example 1:
  2. local result = findColors({{0x00ddff,0,0}, {0x00eeff,10,10}, {0x0000ff,0,20}}, 2, nil);
  3. for i, v in pairs(result) do
  4. log(string.format("Found rect at: x:%f, y:%f", v[1], v[2]));
  5. end
  6. -- Example 2:
  7. local colors = {{0x00ddff,0,0}, {0x00eeff,10,10}, {0x0000ff,0,20}};
  8. local result = findColors(colors, 0, nil);
  9. for i, v in pairs(result) do
  10. log(string.format("Found rect at: x:%f, y:%f", v[1], v[2]));
  11. end
  12. -- Example 3:
  13. local colors = {{0x00ddff,0,0}, {0x00eeff,10,10}, {0x0000ff,0,20}};
  14. local region = {100, 50, 200, 200};
  15. local result = findColors(colors, 0, region);
  16. for i, v in pairs(result) do
  17. log(string.format("Found rect at: x:%f, y:%f", v[1], v[2]));
  18. end

findImage(imagePath, count, fuzzy, ignoreColors, region)

Search the area matched the specified picture on current screen and return the coordinate of the top left corner of all areas by table format.

Parameters

Parameter Type Specification
imagePath String The path of picture to be searched. From AutoTouch v3.1.1, you need not input complete path here, but only input the location subordinated to AutoTouch file directory, namely, the path of “Local Script”. (you can get the path of the file directory by rootDir function). For example, “images/script.bmp” means “/var/mobile/Library/AutoTouch/Scripts/images/spirit.bmp”. You need not input the complete path.
count Integer The number refers to how many matched pixel points is found at most. 0 is default setting, which shows all matching points are found. 1 refers to only the first matching pixel point is found. 2 refers to only the first two pixel points are found. The less the number is, the faster the speed is.
fuzzy float The floating degree of the search. 1 is default setting and refers to complete matching. 0.5 refers to 50%v of matching.
ignoreColors table The color value to be ignored in the search is provided by array, such as {0xffffff, 0x2b2b2b}. You can input nil if one.
region table You only search the result in the specified area. This area is the table type including four values {x, y, width, height}. The four values respectively represent the coordinate x, coordinate y, width, and height of the rectangular area. {100,100,200,200} is an example. If you do not want to specify the area, just input nil.

Return values

Return value Type Specification
locations table The array at the coordinate on the top left corner of the matched area: {{x1, y1}, {x2, y2}, ...}

Examples

  1. -- Example 1:
  2. local result = findImage("images/spirit.bmp", 5, 1, nil, nil);
  3. for i, v in pairs(result) do
  4. log(string.format("Found rect at: x:%f, y:%f", v[1], v[2]));
  5. end
  6. -- Example 2:
  7. local result = findImage("images/spirit.bmp", 0, 0.6, nil, nil};
  8. for i, v in pairs(result) do
  9. log(string.format("Found rect at: x:%f, y:%f", v[1], v[2]));
  10. end
  11. -- Example 3:
  12. local result = findImage("images/spirit.bmp", 0, {0xffffff, 0x2b2b2b}, nil};
  13. for i, v in pairs(result) do
  14. log(string.format("Found rect at: x:%f, y:%f", v[1], v[2]));
  15. end
  16. -- Example 4:
  17. local imagePath = "images/spirit.bmp";
  18. local region = {100, 50, 200, 200};
  19. local ignoreColors = {0xffffff, 0x2b2b2b};
  20. local result = findImage(imagePath, 1, 0.9, ignoreColors, region};
  21. for i, v in pairs(result) do
  22. local x = v[1], y = v[2];
  23. log(string.format("Found rect at: x:%f, y:%f", x, y));
  24. -- Click the found location once.
  25. tap(x, y);
  26. usleep(16000);
  27. end

screenshot(filePath, region)

Take a screenshot for the whole screen or specified area and save as BMP format at specified file path.

Parameters

Parameter Type Specification
filePath string The path of screenshot. From AutoTouch v3.1.1, you only input the location subordinated to AutoTouch file directory, namely, the path of “Local Script”. (you can get the path of the file directory by rootDir function). For example, “images/script.bmp” means “/var/mobile/Library/AutoTouch/Scripts/images/spirit.bmp”. You need not input the complete path.
region table You make a screenshot of the specified area. This area is the table type including four values {x, y, width, height}. The four values respectively represent the coordinate x, coordinate y, width, and height of the rectangular area. {100,100,200,200} is an example. If you do not want to specify the area, just input nil.

Return values
None

Examples

  1. -- Take a screenshot of the whole screen and save in the specified location.
  2. screenshot ("images/screenshot1.bmp", nil);
  3. -- Take a screenshot of the specified area and save.
  4. screenshot ("images/screenshot2.bmp", {100, 100, 200, 200});

appRun(appIdentifier)

Run specified application.

Parameters

Parameter Type Specification
appIdentifier string Application identifier, including "com.apple.mobilesafari".

Return values
None

Example

  1. -- Run Safari
  2. appRun("com.apple.mobilesafari");

appKill(appIdentifier)

Kill specified application.

Parameters

Parameter Type Specification
appIdentifier string Application identifier, including "com.apple.mobilesafari".

Return values
None

Example

  1. -- Kill the running Safari
  2. appKill("com.apple.mobilesafari");

appState(appIdentifier)

Get the running state of the specified application

Parameters

Parameter Type Specification
appIdentifier string Application identifier, including "com.apple.mobilesafari".

Return values

Return value Type Specification
state string State of Character string type: "NOT RUNNING", "ACTIVATED", "DEACTIVATED"。

Example

  1. -- Get the state of Safari.
  2. local state = appState("com.apple.mobilesafari");
  3. alert(string.format("State of Safari: %s", state));
  4. -- Pop up the state of Safari: "ACTIVATED"


rootDir()

Get the default directory address of the saved script. This is the default saving address of scripts and screenshots: "/var/mobile/Library/AutoTouch/Scripts/".

Parameters
None

Return values

Return value Type Specification
dir string Default directory address of the saved script.

Examples

  1. local dirPath = rootDir();
  2. alert(dirPath);
  3. -- Popup "/var/mobile/Library/AutoTouch/Scripts/"

usleep(microseconds)

Sleep several microseconds (1/1000000)

Parameters

Parameter Type Specification
microseconds Integer The number of paused microseconds.

Return values
None

Examples

  1. -- Sleep 1 second.
  2. usleep(1000000);

log(content)

Record log, can be seen in the log interface.

Parameters

Parameter Type Specification
content string The log content to be recorded.

Return values
None

Examples

  1. log("play here...");

alert(message)

Pop up the dialog box to show specified content.

Parameters

Parameter Type Specification
message string Content to be showed.

Return values
None

Examples

  1. alert("Hello World!");

vibrate()

Vibrate once.。

Parameters
None

Return values
None

Examples

  1. -- Vibrate once.
  2. vibrate();

playAudio(audioFile, times)

Play audio document at specified location.

Parameters

Parameter Type Specification
audioFile string Absolute path of audio document.
times integer Number of repeated plays. 0 represents infinite repeat.

Return values
None

Examples

  1. -- Play audio infinitely.
  2. playAudio("/var/audio.mp3", 0);

stopAudio()

Stop playing audio.

Parameters
None

Return values
None

Examples

  1. -- Stop playing audio.
  2. stopAudio();

getOrientation()

Get orientation of the screen. Return the integer value. Please refer to the “Orientation Type of Screen” for specific correspondence relation.

Parameters
None

Return values

Return value Type Specification
orientation Integer Screen orientation may be these values

示例

  1. local o = getOrientation();
  2. alert(string.format("Screen orientation is : %d", 0))
  3. -- Pop up the orientation 2 of the screen, and mark the reversed screen.

getScreenResolution()

Get screen resolution bese on pixels.

Parameters
None

Return values

Return value Type Specification
width Integer Width of screen resolution.
height Integer Height of screen resolution.

Examples

  1. local w, h = getScreenResolution();
  2. alert(string.format("Resolution of iPhone 6 Plus: width:%d, height:%d", w, h));
  3. -- iPhone 6 Pluss resolution width is 1242 and resolution height is 2208.

getSN()

 Get Serial Number of the device.

Parameters
None

Return values

Return value Type Specification
SN string Serial Number of the device.

Examples

  1. local sn = getSN();
  2. alert(string.format("SN is : %s", sn));
  3. -- Popup shows the SN of the device: C15NFK32TWD2

getVersion()

Get version of AutoTouch.

Parameters
None

Return values

Return value Type Specification
version string Version of AutoTouch.

Examples

  1. local version = getVersion();
  2. alert(string.format("Current version of AutoTouch is : %s", version));
  3. -- Pop up shows current version of AutoTouch: 3.5.3-4

intToRgb(intColor)

Transit integer color to independent values of R,G,B.

Parameters

Parameter Type Specification
intColor Integer Integer color value

Return values

Return value Type Specification
R Integer Red color value.
G Integer Green color value.
B Integer Blue color value.

Examples

  1. local r, g, b = intToRgb(0x2b2b2b);
  2. alert(string.format("R:%d, G:%d, B:%d", r, g, b));

rgbToInt(r, g, b)

Transit values of R,G,B to integer color value.

Parameters

Parameter Type Specification
R Integer Red color value.
G Integer Green color value.
B Integer Blue color value.

Return values

Return value Type Specification
intColor Integer Integer color value

Examples

  1. local intColor = rgbToInt(200, 255, 100);
  2. alert(string.format("Int type color: %d", intColor));

copyText(text)

Copy specified text to clipboard.

Parameters

Parameter Type Specification
text string Text to be copied.

Return values
None

Examples

  1. copyText("This is a copied text!");

clipText()

Get the text in the clipboard.

Parameters
None

Return values

Return value Type Specification
text string Text copied in the clipboard.

Examples

  1. local text = clipText();
  2. alert(text);
  3. -- Popup shows the text to be copied: "This is a copied text!";

inputText(text)

Input text to the input box selected now. You can delete a character backspace by inputText("\b").

Parameters

Parameter Type Specification
text string Text to be input.

Return values
None

Examples

  1. inputText("Let's input some text automatically without tapping the keyboard!");
  2. -- Delete 3 character by inputing 3 backspaces.
  3. inputText("\b\b\b");

fakeLocation(appIdentifier, latitude, longitude)

Fake location of specified application and the fake location will be effective until the fake location is cleared by clearFakeLocation function or in AutoTouch Application Setting – Fake Location.

Parameters

Parameter Type Specification
appIdentifier string Application identifier, such as "com.apple.Maps".
latitude double double type latitude value.
longitude double double type longitude value.

Return values
None

Examples

  1. -- Fake geographic location for Apple Map to latitude 36° longitude 50°.
  2. fakeLocation("com.apple.Maps", 36, 50);

clearFakeLocation(appIdentifier)

Clear fake location of specified application.

Parameters

Parameter Type Specification
appIdentifier string Application identifier, such as "com.apple.Maps".

Return values
None

Examples

  1. -- Fake location for Apple Map.
  2. clearFakeLocation("com.apple.Maps");

dialog(controls, enableRemember)

Pop up self-defined dialog box to accept the user input. Please refer to the example for specific usage.

Parameters

Parameter Type Specification
controls table Array of self-defined controls. You can now use these dialog box controls
enableRemember boolean Whether to use the "remember user's input" function.

Return values
None

Examples

  1. local label = {type=CONTROLLER_TYPE.LABEL, text="Would you mind to provide some personal informations?"}
  2. local nameInput = {type=CONTROLLER_TYPE.INPUT, title="Name:", key="Name", value="Kevin"}
  3. local positionPicker = {type=CONTROLLER_TYPE.PICKER, title="Position:", key="Position", value="CEO", options={"CEO", "CTO", "CFO", "CXO"}}
  4. local developerSwitch = {type=CONTROLLER_TYPE.SWITCH, title="A Developer:", key="ADeveloper", value=1}
  5. local controls = {label, nameInput, positionPicker, developerSwitch}
  6. local enableRemember = true;
  7. -- Pop up the dialog box. After the popup, the script will suspend for user input until the user click confirm or cancel”.
  8. dialog(controls, enableRemember);
  9. -- Then get the input value of user.
  10. alert(string.format("name:%s, birthday:%s, gender:%d", nameInput.value, positionPicker.value, developerSwitch.value))

3.png-115.9kB


clearDialogValues(script)

Clear the remembered values of the dialog created by the function dialog.

Parameters

Parameter Type Specification
script string script path. eg. there is a dialog.lua script in the scripts list, use it like this: clearDialogValues("dialog.lua");

Return values
None

Examples

  1. -- There is a dialog.lua script in the scripts list
  2. clearDialogValues("dialog.lua");

Some Constants


Type of physical key

Value Specification
KEY_TYPE.HOME_BUTTON Home Button
KEY_TYPE.VOLUME_DOWN_BUTTON Volume – Button
KEY_TYPE.VOLUME_UP_BUTTON Volume + Button
KEY_TYPE.POWER_BUTTON Power Button

Type of dialog control

Value Specification
CONTROLLER_TYPE.LABEL Text label
CONTROLLER_TYPE.INPUT Input box
CONTROLLER_TYPE.PICKER Picker
CONTROLLER_TYPE.SWITCH Switch

Type of screen orientation

Value Specification
ORIENTATION_TYPE.UNKNOWN Unknown orientation. Practical value is 0.
ORIENTATION_TYPE.PORTRAIT Portrait screen. Home button is at the bottom. Practical value is 1.
ORIENTATION_TYPE.PORTRAIT_UPSIDE_DOWN Upside-down portrait screen. Home button on the top. Practical value is 2.
ORIENTATION_TYPE.LANDSCAPE_LEFT Landscape left screen. Home Key is in the left. Practical value is 3.
ORIENTATION_TYPE.LANDSCAPE_RIGHT Landscape right screen. Home key is in the right. Practical value is 4.