- Signing Your Applications
- In this document
- See also
- Signing Overview
- Signing in Debug Mode
- Signing in Release Mode
- Signing Android Wear Apps
- Signing Your App in Android Studio
- Automatically Signing Your App
- Signing Considerations
- Securing Your Private Key
- Expiry of the Debug Certificate
- Signing Your App Manually
- Android Platform
- What Does Android Platform Mean?
- Techopedia Explains Android Platform
- Android Key Codes
Signing Your Applications
In this document
See also
Android requires that all apps be digitally signed with a certificate before they can be installed. Android uses this certificate to identify the author of an app, and the certificate does not need to be signed by a certificate authority. Android apps often use self-signed certificates. The app developer holds the certificate’s private key.
Signing Overview
You can sign an app in debug or release mode. You sign your app in debug mode during development and in release mode when you are ready to distribute your app. The Android SDK generates a certificate to sign apps in debug mode. To sign apps in release mode, you need to generate your own certificate.
Signing in Debug Mode
In debug mode, you sign your app with a debug certificate generated by the Android SDK tools. This certificate has a private key with a known password, so you can run and debug your app without typing the password every time you make a change to your project.
Android Studio signs your app in debug mode automatically when you run or debug your project from the IDE.
You can run and debug an app signed in debug mode on the emulator and on devices connected to your development manchine through USB, but you cannot distribute an app signed in debug mode.
By default, the debug configuration uses a debug keystore, with a known password and a default key with a known password. The debug keystore is located in $HOME/.android/debug.keystore, and is created if not present. The debug build type is set to use this debug SigningConfig automatically.
For more information about how to build and run apps in debug mode, see Building and Running.
Signing in Release Mode
In release mode, you sign your app with your own certificate:
- Create a keystore. A keystore is a binary file that contains a set of private keys. You must keep your keystore in a safe and secure place.
- Create a private key. A private key represents the entity to be identified with the app, such as a person or a company.
Add the signing configuration to the build file for the app module:
The package in app/build/apk/app-release.apk is now signed with your release key.
Note: Including the passwords for your release key and keystore inside the build file is not a good security practice. Alternatively, you can configure the build file to obtain these passwords from environment variables or have the build process prompt you for these passwords.
To obtain these passwords from environment variables:
To have the build process prompt you for these passwords if you are invoking the build from the command line:
After you complete this process, you can distribute your app and publish it on Google Play.
Warning: Keep your keystore and private key in a safe and secure place, and ensure that you have secure backups of them. If you publish an app to Google Play and then lose the key with which you signed your app, you will not be able to publish any updates to your app, since you must always sign all versions of your app with the same key.
The rest of this document provides detailed instructions about how to generate a private key and sign your apps in release mode with Android Studio.
Signing Android Wear Apps
When publishing Android Wear apps, you package the wearable app inside of a handheld app, because users cannot browse and install apps directly on the wearable. Both apps must be signed. For more information on packaging and signing Android Wear apps, see Packaging Wearable Apps.
Signing Your App in Android Studio
To sign your app in release mode in Android Studio, follow these steps:
- On the menu bar, click Build >Generate Signed APK.
On the Generate Signed APK Wizard window, click Create new to create a new keystore.
If you already have a keystore, go to step 4.
On the New Key Store window, provide the required information as shown in figure 1.
Your key should be valid for at least 25 years, so you can sign app updates with the same key through the lifespan of your app.
Figure 1. Create a new keystore in Android Studio.
On the Generate Signed APK Wizard window, select a keystore, a private key, and enter the passwords for both. Then click Next.
Figure 2. Select a private key in Android Studio.
On the next window, select a destination for the signed APK and click Finish.
Figure 3. Generate a signed APK in Android Studio.
Automatically Signing Your App
In Android Studio, you can configure your project to sign your release APK automatically during the build process:
- On the project browser, right click on your app and select Open Module Settings.
- On the Project Structure window, select your app’s module under Modules.
- Click on the Signing tab.
Select your keystore file, enter a name for this signing configuration (as you may create more than one), and enter the required information.
Figure 4. Create a signing configuration in Android Studio.
Under Signing Config, select the signing configuration you just created.
Figure 5. Select a signing configuration in Android Studio.
You can also specify your signing settings in Gradle configuration files. For more information, see Configuring Gradle Builds.
Signing Considerations
You should sign all of your apps with the same certificate throughout the expected lifespan of your applications. There are several reasons why you should do so:
- App upgrade: When the system is installing an update to an app, it compares the certificate(s) in the new version with those in the existing version. The system allows the update if the certificates match. If you sign the new version with a different certificate, you must assign a different package name to the application—in this case, the user installs the new version as a completely new application.
- App modularity: Android allows apps signed by the same certificate to run in the same process, if the applications so requests, so that the system treats them as a single application. In this way you can deploy your app in modules, and users can update each of the modules independently.
- Code/data sharing through permissions: Android provides signature-based permissions enforcement, so that an app can expose functionality to another app that is signed with a specified certificate. By signing multiple apps with the same certificate and using signature-based permissions checks, your apps can share code and data in a secure manner.
If you plan to support upgrades for an app, ensure that your key has a validity period that exceeds the expected lifespan of that app. A validity period of 25 years or more is recommended. When your key’s validity period expires, users will no longer be able to seamlessly upgrade to new versions of your application.
If you plan to publish your apps on Google Play, the key you use to sign these apps must have a validity period ending after 22 October 2033. Google Play enforces this requirement to ensure that users can seamlessly upgrade apps when new versions are available.
Securing Your Private Key
Maintaining the security of your private key is of critical importance, both to you and to the user. If you allow someone to use your key, or if you leave your keystore and passwords in an unsecured location such that a third-party could find and use them, your authoring identity and the trust of the user are compromised.
If a third party should manage to take your key without your knowledge or permission, that person could sign and distribute apps that maliciously replace your authentic apps or corrupt them. Such a person could also sign and distribute apps under your identity that attack other apps or the system itself, or corrupt or steal user data.
Your private key is required for signing all future versions of your app. If you lose or misplace your key, you will not be able to publish updates to your existing appn. You cannot regenerate a previously generated key.
Your reputation as a developer entity depends on your securing your private key properly, at all times, until the key is expired. Here are some tips for keeping your key secure:
- Select strong passwords for the keystore and key.
- Do not give or lend anyone your private key, and do not let unauthorized persons know your keystore and key passwords.
- Keep the keystore file containing your private key in a safe, secure place.
In general, if you follow common-sense precautions when generating, using, and storing your key, it will remain secure.
Expiry of the Debug Certificate
The self-signed certificate used to sign your application in debug mode has an expiration date of 365 days from its creation date. When the certificate expires, you will get a build error.
To fix this problem, simply delete the debug.keystore file. The default storage location is in
/.android/ on OS X and Linux, in C:\Documents and Settings\ \.android\ on Windows XP, and in C:\Users\ \.android\ on Windows Vista and Windows 7.
The next time you build, the build tools will regenerate a new keystore and debug key.
Note that, if your development machine is using a non-Gregorian locale, the build tools may erroneously generate an already-expired debug certificate, so that you get an error when trying to compile your application. For workaround information, see the troubleshooting topic I can’t compile my app because the build tools generated an expired debug certificate.
Signing Your App Manually
You do not need Android Studio to sign your app. You can sign your app from the command line using standard tools from the Android SDK and the JDK. To sign an app in release mode from the command line:
Generate a private key using keytool . For example:
This example prompts you for passwords for the keystore and key, and to provide the Distinguished Name fields for your key. It then generates the keystore as a file called my-release-key.keystore . The keystore contains a single key, valid for 10000 days. The alias is a name that you will use later when signing your app.
Compile your app in release mode to obtain an unsigned APK.
Sign your app with your private key using jarsigner :
This example prompts you for passwords for the keystore and key. It then modifies the APK in-place to sign it. Note that you can sign an APK multiple times with different keys.
Verify that your APK is signed. For example:
Align the final APK package using zipalign .
zipalign ensures that all uncompressed data starts with a particular byte alignment relative to the start of the file, which reduces the amount of RAM consumed by an app.
Источник
Android Platform
Table of Contents
What Does Android Platform Mean?
The Android platform is a platform for mobile devices that uses a modified Linux kernel. The Android Platform was introduced by the Open Handset Alliance in November of 2007. Most applications that run on the Android platform are written in the Java programming language.
Techopedia Explains Android Platform
The Android Platform was launched in 2007 by the Open Handset Alliance, an alliance of prominent companies that includes Google, HTC, Motorola, Texas Instruments and others. Although most of the applications that run on the Android Platform are written in Java, there is no Java Virtual Machine. Instead, the Java classes are first compiled into what are known as Dalvik Executables and run on the Dalvik Virtual Machine.
Android is an open development platform. However, it is not open in the sense that everyone can contribute while a version is under development. This is all done behind closed-doors at Google. Rather, the openness of Android starts when its source code is released to the public after it is finalized. This means once it is released anyone interested can take the code and alter it as they see fit.
To create an application for the platform, a developer requires the Android SDK, which includes tools and APIs. To shorten development time, Android developers typically integrate the SDK into graphical user IDEs (Integrated Development Environments). Beginners can also make use of the App Inventor, an application for creating Android apps that can be accessed online.
Источник
Android Key Codes
List of Android Key Codes
Unknown key code
KEYCODE_UNKNOWN = 0
Soft Left key
Usually situated below the display on phones and used as a multi-function
feature key for selecting a software defined function shown on the bottom left
of the display
KEYCODE_SOFT_LEFT = 1
Soft Right key
Usually situated below the display on phones and used as a multi-function
feature key for selecting a software defined function shown on the bottom right
of the display
KEYCODE_SOFT_RIGHT = 2
Home key
KEYCODE_HOME = 3
Back key
KEYCODE_BACK = 4
Call key
KEYCODE_CALL = 5
End Call key
KEYCODE_ENDCALL = 6
‘0’ key
KEYCODE_0 = 7
‘1’ key
KEYCODE_1 = 8
‘2’ key
KEYCODE_2 = 9
‘3’ key
KEYCODE_3 = 10
‘4’ key
KEYCODE_4 = 11
‘5’ key
KEYCODE_5 = 12
‘6’ key
KEYCODE_6 = 13
‘7’ key
KEYCODE_7 = 14
‘8’ key
KEYCODE_8 = 15
‘9’ key
KEYCODE_9 = 16
‘*’ key
KEYCODE_STAR = 17
‘#’ key
KEYCODE_POUND = 18
Directional Pad Up key
KEYCODE_DPAD_UP = 19
Directional Pad Down key
KEYCODE_DPAD_DOWN = 20
Directional Pad Left key
KEYCODE_DPAD_LEFT = 21
Directional Pad Right key
KEYCODE_DPAD_RIGHT = 22
Directional Pad Center key
KEYCODE_DPAD_CENTER = 23
Volume Up key
KEYCODE_VOLUME_UP = 24
Volume Down key
KEYCODE_VOLUME_DOWN = 25
Power key
KEYCODE_POWER = 26
Camera key
Used to launch a camera application or take pictures
KEYCODE_CAMERA = 27
Clear key
KEYCODE_CLEAR = 28
‘A’ key
KEYCODE_A = 29
‘B’ key
KEYCODE_B = 30
‘C’ key
KEYCODE_C = 31
‘D’ key
KEYCODE_D = 32
‘E’ key
KEYCODE_E = 33
‘F’ key
KEYCODE_F = 34
‘G’ key
KEYCODE_G = 35
‘H’ key
KEYCODE_H = 36
‘I’ key
KEYCODE_I = 37
‘J’ key
KEYCODE_J = 38
‘K’ key
KEYCODE_K = 39
‘L’ key
KEYCODE_L = 40
‘M’ key
KEYCODE_M = 41
‘N’ key
KEYCODE_N = 42
‘O’ key
KEYCODE_O = 43
‘P’ key
KEYCODE_P = 44
‘Q’ key
KEYCODE_Q = 45
‘R’ key
KEYCODE_R = 46
‘S’ key
KEYCODE_S = 47
‘T’ key
KEYCODE_T = 48
‘U’ key
KEYCODE_U = 49
‘V’ key
KEYCODE_V = 50
‘W’ key
KEYCODE_W = 51
‘X’ key
KEYCODE_X = 52
‘Y’ key
KEYCODE_Y = 53
‘Z’ key
KEYCODE_Z = 54
‘,’ key
KEYCODE_COMMA = 55
‘.’ key
KEYCODE_PERIOD = 56
Left Alt modifier key
KEYCODE_ALT_LEFT = 57
Right Alt modifier key
KEYCODE_ALT_RIGHT = 58
Left Shift modifier key
KEYCODE_SHIFT_LEFT = 59
Right Shift modifier key
KEYCODE_SHIFT_RIGHT = 60
Tab key
KEYCODE_TAB = 61
Space key
KEYCODE_SPACE = 62
Symbol modifier key
Used to enter alternate symbols
KEYCODE_SYM = 63
Explorer special function key
Used to launch a browser application
KEYCODE_EXPLORER = 64
Envelope special function key
Used to launch a mail application
KEYCODE_ENVELOPE = 65
Enter key
KEYCODE_ENTER = 66
Backspace key
Deletes characters before the insertion point, unlike KEYCODE_FORWARD_DEL
KEYCODE_DEL = 67
‘`’ (backtick) key
KEYCODE_GRAVE = 68
‘-‘
KEYCODE_MINUS = 69
‘ = ‘ key
KEYCODE_EQUALS = 70
‘[‘ key
KEYCODE_LEFT_BRACKET = 71
‘]’ key
KEYCODE_RIGHT_BRACKET = 72
‘\’ key
KEYCODE_BACKSLASH = 73
‘;’ key
KEYCODE_SEMICOLON = 74
”’ (apostrophe) key
KEYCODE_APOSTROPHE = 75
‘/’ key
KEYCODE_SLASH = 76
‘@’ key
KEYCODE_AT = 77
Number modifier key
Used to enter numeric symbols
This key is not Num Lock; it is more like KEYCODE_ALT_LEFT and is
interpreted as an ALT key
KEYCODE_NUM = 78
Headset Hook key
Used to hang up calls and stop media
KEYCODE_HEADSETHOOK = 79
Camera Focus key
Used to focus the camera
KEYCODE_FOCUS = 80
‘+’ key
KEYCODE_PLUS = 81
Menu key
KEYCODE_MENU = 82
Notification key
KEYCODE_NOTIFICATION = 83
Search key
KEYCODE_SEARCH = 84
Play/Pause media key
KEYCODE_MEDIA_PLAY_PAUSE = 85
Stop media key
KEYCODE_MEDIA_STOP = 86
Play Next media key
KEYCODE_MEDIA_NEXT = 87
Play Previous media key
KEYCODE_MEDIA_PREVIOUS = 88
Rewind media key
KEYCODE_MEDIA_REWIND = 89
Fast Forward media key
KEYCODE_MEDIA_FAST_FORWARD = 90
Mute key
Mutes the microphone, unlike KEYCODE_VOLUME_MUTE
KEYCODE_MUTE = 91
Page Up key
KEYCODE_PAGE_UP = 92
Page Down key
KEYCODE_PAGE_DOWN = 93
Picture Symbols modifier key
Used to switch symbol sets (Emoji, Kao-moji)
KEYCODE_PICTSYMBOLS = 94
Switch Charset modifier key
Used to switch character sets (Kanji, Katakana)
KEYCODE_SWITCH_CHARSET = 95
A Button key
On a game controller, the A button should be either the button labeled A
or the first button on the bottom row of controller buttons
KEYCODE_BUTTON_A = 96
B Button key
On a game controller, the B button should be either the button labeled B
or the second button on the bottom row of controller buttons
KEYCODE_BUTTON_B = 97
C Button key
On a game controller, the C button should be either the button labeled C
or the third button on the bottom row of controller buttons
KEYCODE_BUTTON_C = 98
X Button key
On a game controller, the X button should be either the button labeled X
or the first button on the upper row of controller buttons
KEYCODE_BUTTON_X = 99
Y Button key
On a game controller, the Y button should be either the button labeled Y
or the second button on the upper row of controller buttons
KEYCODE_BUTTON_Y = 100
Z Button key
On a game controller, the Z button should be either the button labeled Z
or the third button on the upper row of controller buttons
KEYCODE_BUTTON_Z = 101
L1 Button key
On a game controller, the L1 button should be either the button labeled L1 (or L)
or the top left trigger button
KEYCODE_BUTTON_L1 = 102
R1 Button key
On a game controller, the R1 button should be either the button labeled R1 (or R)
or the top right trigger button
KEYCODE_BUTTON_R1 = 103
L2 Button key
On a game controller, the L2 button should be either the button labeled L2
or the bottom left trigger button
KEYCODE_BUTTON_L2 = 104
R2 Button key
On a game controller, the R2 button should be either the button labeled R2
or the bottom right trigger button
KEYCODE_BUTTON_R2 = 105
Left Thumb Button key
On a game controller, the left thumb button indicates that the left (or only)
joystick is pressed
KEYCODE_BUTTON_THUMBL = 106
Right Thumb Button key
On a game controller, the right thumb button indicates that the right
joystick is pressed
KEYCODE_BUTTON_THUMBR = 107
Start Button key
On a game controller, the button labeled Start
KEYCODE_BUTTON_START = 108
Select Button key
On a game controller, the button labeled Select
KEYCODE_BUTTON_SELECT = 109
Mode Button key
On a game controller, the button labeled Mode
KEYCODE_BUTTON_MODE = 110
Escape key
KEYCODE_ESCAPE = 111
Forward Delete key
Deletes characters ahead of the insertion point, unlike KEYCODE_DEL
KEYCODE_FORWARD_DEL = 112
Left Control modifier key
KEYCODE_CTRL_LEFT = 113
Right Control modifier key
KEYCODE_CTRL_RIGHT = 114
Caps Lock key
KEYCODE_CAPS_LOCK = 115
Scroll Lock key
KEYCODE_SCROLL_LOCK = 116
Left Meta modifier key
KEYCODE_META_LEFT = 117
Right Meta modifier key
KEYCODE_META_RIGHT = 118
Function modifier key
KEYCODE_FUNCTION = 119
System Request / Print Screen key
KEYCODE_SYSRQ = 120
Break / Pause key
KEYCODE_BREAK = 121
Home Movement key
Used for scrolling or moving the cursor around to the start of a line
or to the top of a list
KEYCODE_MOVE_HOME = 122
End Movement key
Used for scrolling or moving the cursor around to the end of a line
or to the bottom of a list
KEYCODE_MOVE_END = 123
Insert key
Toggles insert / overwrite edit mode
KEYCODE_INSERT = 124
Forward key
Navigates forward in the history stack. Complement of KEYCODE_BACK
KEYCODE_FORWARD = 125
Play media key
KEYCODE_MEDIA_PLAY = 126
Pause media key
KEYCODE_MEDIA_PAUSE = 127
Close media key
May be used to close a CD tray, for example
KEYCODE_MEDIA_CLOSE = 128
Eject media key
May be used to eject a CD tray, for example
KEYCODE_MEDIA_EJECT = 129
Record media key
KEYCODE_MEDIA_RECORD = 130
F1 key
KEYCODE_F1 = 131
F2 key
KEYCODE_F2 = 132
F3 key
KEYCODE_F3 = 133
F4 key
KEYCODE_F4 = 134
F5 key
KEYCODE_F5 = 135
F6 key
KEYCODE_F6 = 136
F7 key
KEYCODE_F7 = 137
F8 key
KEYCODE_F8 = 138
F9 key
KEYCODE_F9 = 139
F10 key
KEYCODE_F10 = 140
F11 key
KEYCODE_F11 = 141
F12 key
KEYCODE_F12 = 142
Num Lock key
This is the Num Lock key; it is different from KEYCODE_NUM
This key alters the behavior of other keys on the numeric keypad
KEYCODE_NUM_LOCK = 143
Numeric keypad ‘0’ key
KEYCODE_NUMPAD_0 = 144
Numeric keypad ‘1’ key
KEYCODE_NUMPAD_1 = 145
Numeric keypad ‘2’ key
KEYCODE_NUMPAD_2 = 146
Numeric keypad ‘3’ key
KEYCODE_NUMPAD_3 = 147
Numeric keypad ‘4’ key
KEYCODE_NUMPAD_4 = 148
Numeric keypad ‘5’ key
KEYCODE_NUMPAD_5 = 149
Numeric keypad ‘6’ key
KEYCODE_NUMPAD_6 = 150
Numeric keypad ‘7’ key
KEYCODE_NUMPAD_7 = 151
Numeric keypad ‘8’ key
KEYCODE_NUMPAD_8 = 152
Numeric keypad ‘9’ key
KEYCODE_NUMPAD_9 = 153
Numeric keypad ‘/’ key (for division)
KEYCODE_NUMPAD_DIVIDE = 154
Numeric keypad ‘*’ key (for multiplication)
KEYCODE_NUMPAD_MULTIPLY = 155
Numeric keypad ‘-‘ key (for subtraction)
KEYCODE_NUMPAD_SUBTRACT = 156
Numeric keypad ‘+’ key (for addition)
KEYCODE_NUMPAD_ADD = 157
Numeric keypad ‘.’ key (for decimals or digit grouping)
KEYCODE_NUMPAD_DOT = 158
Numeric keypad ‘,’ key (for decimals or digit grouping)
KEYCODE_NUMPAD_COMMA = 159
Numeric keypad Enter key
KEYCODE_NUMPAD_ENTER = 160
Numeric keypad ‘ = ‘ key
KEYCODE_NUMPAD_EQUALS = 161
Numeric keypad ‘(‘ key
KEYCODE_NUMPAD_LEFT_PAREN = 162
Numeric keypad ‘)’ key
KEYCODE_NUMPAD_RIGHT_PAREN = 163
Volume Mute key
Mutes the speaker, unlike KEYCODE_MUTE
This key should normally be implemented as a toggle such that the first press
mutes the speaker and the second press restores the original volume
KEYCODE_VOLUME_MUTE = 164
Info key
Common on TV remotes to show additional information related to what is
currently being viewed
KEYCODE_INFO = 165
Channel up key
On TV remotes, increments the television channel
KEYCODE_CHANNEL_UP = 166
Channel down key
On TV remotes, decrements the television channel
KEYCODE_CHANNEL_DOWN = 167
Zoom in key
KEYCODE_ZOOM_IN = 168
Zoom out key
KEYCODE_ZOOM_OUT = 169
TV key
On TV remotes, switches to viewing live TV
KEYCODE_TV = 170
Window key
On TV remotes, toggles picture-in-picture mode or other windowing functions
On Android Wear devices, triggers a display offset
KEYCODE_WINDOW = 171
Guide key
On TV remotes, shows a programming guide
KEYCODE_GUIDE = 172
DVR key
On some TV remotes, switches to a DVR mode for recorded shows
KEYCODE_DVR = 173
Bookmark key
On some TV remotes, bookmarks content or web pages
KEYCODE_BOOKMARK = 174
Toggle captions key
Switches the mode for closed-captioning text, for example during television shows
KEYCODE_CAPTIONS = 175
Settings key
Starts the system settings activity
KEYCODE_SETTINGS = 176
TV power key
On TV remotes, toggles the power on a television screen
KEYCODE_TV_POWER = 177
TV input key
On TV remotes, switches the input on a television screen
KEYCODE_TV_INPUT = 178
Set-top-box power key
On TV remotes, toggles the power on an external Set-top-box
KEYCODE_STB_POWER = 179
Set-top-box input key
On TV remotes, switches the input mode on an external Set-top-box
KEYCODE_STB_INPUT = 180
A/V Receiver power key
On TV remotes, toggles the power on an external A/V Receiver
KEYCODE_AVR_POWER = 181
A/V Receiver input key
On TV remotes, switches the input mode on an external A/V Receiver
KEYCODE_AVR_INPUT = 182
Red “programmable” key
On TV remotes, acts as a contextual/programmable key
KEYCODE_PROG_RED = 183
Green “programmable” key
On TV remotes, actsas a contextual/programmable key
KEYCODE_PROG_GREEN = 184
Yellow “programmable” key
On TV remotes, acts as a contextual/programmable key
KEYCODE_PROG_YELLOW = 185
Blue “programmable” key
On TV remotes, acts as a contextual/programmable key
KEYCODE_PROG_BLUE = 186
App switch key
Should bring up the application switcher dialog
KEYCODE_APP_SWITCH = 187
Generic Game Pad Button #1
KEYCODE_BUTTON_1 = 188
Generic Game Pad Button #2
KEYCODE_BUTTON_2 = 189
Generic Game Pad Button #3
KEYCODE_BUTTON_3 = 190
Generic Game Pad Button #4
KEYCODE_BUTTON_4 = 191
Generic Game Pad Button #5
KEYCODE_BUTTON_5 = 192
Generic Game Pad Button #6
KEYCODE_BUTTON_6 = 193
Generic Game Pad Button #7
KEYCODE_BUTTON_7 = 194
Generic Game Pad Button #8
KEYCODE_BUTTON_8 = 195
Generic Game Pad Button #9
KEYCODE_BUTTON_9 = 196
Generic Game Pad Button #10
KEYCODE_BUTTON_10 = 197
Generic Game Pad Button #11
KEYCODE_BUTTON_11 = 198
Generic Game Pad Button #12
KEYCODE_BUTTON_12 = 199
Generic Game Pad Button #13
KEYCODE_BUTTON_13 = 200
Generic Game Pad Button #14
KEYCODE_BUTTON_14 = 201
Generic Game Pad Button #15
KEYCODE_BUTTON_15 = 202
Generic Game Pad Button #16
KEYCODE_BUTTON_16 = 203
Language Switch key
Toggles the current input language such as switching between English and Japanese on
a QWERTY keyboard. On some devices, the same function may be performed by
pressing Shift+Spacebar
KEYCODE_LANGUAGE_SWITCH = 204
Manner Mode key
Toggles silent or vibrate mode on and off to make the device behave more politely
in certain settings such as on a crowded train. On some devices, the key may only
operate when long-pressed
KEYCODE_MANNER_MODE = 205
3D Mode key
Toggles the display between 2D and 3D mode
KEYCODE_3D_MODE = 206
Contacts special function key
Used to launch an address book application
KEYCODE_CONTACTS = 207
Calendar special function key
Used to launch a calendar application
KEYCODE_CALENDAR = 208
Music special function key
Used to launch a music player application
KEYCODE_MUSIC = 209
Calculator special function key
Used to launch a calculator application
KEYCODE_CALCULATOR = 210
Japanese full-width / half-width key
KEYCODE_ZENKAKU_HANKAKU = 211
Japanese alphanumeric key
KEYCODE_EISU = 212
Japanese non-conversion key
KEYCODE_MUHENKAN = 213
Japanese conversion key
KEYCODE_HENKAN = 214
Japanese katakana / hiragana key
KEYCODE_KATAKANA_HIRAGANA = 215
Japanese Yen key
KEYCODE_YEN = 216
Japanese Ro key
KEYCODE_RO = 217
Japanese kana key
KEYCODE_KANA = 218
Assist key
Launches the global assist activity
KEYCODE_ASSIST = 219
Brightness Down key
Adjusts the screen brightness down
KEYCODE_BRIGHTNESS_DOWN = 220
Brightness Up key
Adjusts the screen brightness up
KEYCODE_BRIGHTNESS_UP = 221
Audio Track key
Switches the audio tracks
KEYCODE_MEDIA_AUDIO_TRACK = 222
Sleep key
Puts the device to sleep. Behaves somewhat like KEYCODE_POWER but it
has no effect if the device is already asleep
KEYCODE_SLEEP = 223
Wakeup key
Wakes up the device. Behaves somewhat like KEYCODE_POWER but it
has no effect if the device is already awake
KEYCODE_WAKEUP = 224
Pairing key
Initiates peripheral pairing mode. Useful for pairing remote control
devices or game controllers, especially if no other input mode is
available
KEYCODE_PAIRING = 225
Media Top Menu key
Goes to the top of media menu
KEYCODE_MEDIA_TOP_MENU = 226
’11’ key
KEYCODE_11 = 227
’12’ key
KEYCODE_12 = 228
Last Channel key
Goes to the last viewed channel
KEYCODE_LAST_CHANNEL = 229
TV data service key
Displays data services like weather, sports
KEYCODE_TV_DATA_SERVICE = 230
Voice Assist key
Launches the global voice assist activity. Not delivered to applications
KEYCODE_VOICE_ASSIST = 231
Radio key
Toggles TV service / Radio service
KEYCODE_TV_RADIO_SERVICE = 232
Teletext key
Displays Teletext service
KEYCODE_TV_TELETEXT = 233
Number entry key
Initiates to enter multi-digit channel nubmber when each digit key is assigned
for selecting separate channel. Corresponds to Number Entry Mode (0x1D) of CEC
User Control Code
KEYCODE_TV_NUMBER_ENTRY = 234
Analog Terrestrial key
Switches to analog terrestrial broadcast service
KEYCODE_TV_TERRESTRIAL_ANALOG = 235
Digital Terrestrial key
Switches to digital terrestrial broadcast service
KEYCODE_TV_TERRESTRIAL_DIGITAL = 236
Satellite key
Switches to digital satellite broadcast service
KEYCODE_TV_SATELLITE = 237
BS key
Switches to BS digital satellite broadcasting service available in Japan
KEYCODE_TV_SATELLITE_BS = 238
CS key
Switches to CS digital satellite broadcasting service available in Japan
KEYCODE_TV_SATELLITE_CS = 239
BS/CS key
Toggles between BS and CS digital satellite services
KEYCODE_TV_SATELLITE_SERVICE = 240
Toggle Network key
Toggles selecting broacast services
KEYCODE_TV_NETWORK = 241
Antenna/Cable key
Toggles broadcast input source between antenna and cable
KEYCODE_TV_ANTENNA_CABLE = 242
HDMI #1 key
Switches to HDMI input #1
KEYCODE_TV_INPUT_HDMI_1 = 243
HDMI #2 key
Switches to HDMI input #2
KEYCODE_TV_INPUT_HDMI_2 = 244
HDMI #3 key
Switches to HDMI input #3
KEYCODE_TV_INPUT_HDMI_3 = 245
HDMI #4 key
Switches to HDMI input #4
KEYCODE_TV_INPUT_HDMI_4 = 246
Composite #1 key
Switches to composite video input #1
KEYCODE_TV_INPUT_COMPOSITE_1 = 247
Composite #2 key
Switches to composite video input #2
KEYCODE_TV_INPUT_COMPOSITE_2 = 248
Component #1 key
Switches to component video input #1
KEYCODE_TV_INPUT_COMPONENT_1 = 249
Component #2 key
Switches to component video input #2
KEYCODE_TV_INPUT_COMPONENT_2 = 250
VGA #1 key
Switches to VGA (analog RGB) input #1
KEYCODE_TV_INPUT_VGA_1 = 251
Audio description key
Toggles audio description off / on
KEYCODE_TV_AUDIO_DESCRIPTION = 252
Audio description mixing volume up key
Louden audio description volume as compared with normal audio volume
KEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP = 253
Audio description mixing volume down key
Lessen audio description volume as compared with normal audio volume
KEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN = 254
Zoom mode key
Changes Zoom mode (Normal, Full, Zoom, Wide-zoom, etc.)
KEYCODE_TV_ZOOM_MODE = 255
Contents menu key
Goes to the title list. Corresponds to Contents Menu (0x0B) of CEC User Control
Code
KEYCODE_TV_CONTENTS_MENU = 256
Media context menu key
Goes to the context menu of media contents. Corresponds to Media Context-sensitive
Menu (0x11) of CEC User Control Code
KEYCODE_TV_MEDIA_CONTEXT_MENU = 257
Timer programming key
Goes to the timer recording menu. Corresponds to Timer Programming (0x54) of
CEC User Control Code
KEYCODE_TV_TIMER_PROGRAMMING = 258
Help key
KEYCODE_HELP = 259
Navigate to previous key
Goes backward by one item in an ordered collection of items
KEYCODE_NAVIGATE_PREVIOUS = 260
Navigate to next key
Advances to the next item in an ordered collection of items
KEYCODE_NAVIGATE_NEXT = 261
Navigate in key
Activates the item that currently has focus or expands to the next level of a navigation
hierarchy
KEYCODE_NAVIGATE_IN = 262
Navigate out key
Backs out one level of a navigation hierarchy or collapses the item that currently has
focus
KEYCODE_NAVIGATE_OUT = 263
Primary stem key for Wear
Main power/reset button on watch
KEYCODE_STEM_PRIMARY = 264
Generic stem key 1 for Wear
KEYCODE_STEM_1 = 265
Generic stem key 2 for Wear
KEYCODE_STEM_2 = 266
Generic stem key 3 for Wear
KEYCODE_STEM_3 = 267
Directional Pad Up-Left
KEYCODE_DPAD_UP_LEFT = 268
Directional Pad Down-Left
KEYCODE_DPAD_DOWN_LEFT = 269
Directional Pad Up-Right
KEYCODE_DPAD_UP_RIGHT = 270
Directional Pad Down-Right
KEYCODE_DPAD_DOWN_RIGHT = 271
Skip forward media key
KEYCODE_MEDIA_SKIP_FORWARD = 272
Skip backward media key
KEYCODE_MEDIA_SKIP_BACKWARD = 273
Step forward media key
Steps media forward, one frame at a time
KEYCODE_MEDIA_STEP_FORWARD = 274
Step backward media key
Steps media backward, one frame at a time
KEYCODE_MEDIA_STEP_BACKWARD = 275
Put device to sleep unless a wakelock is held
KEYCODE_SOFT_SLEEP = 276
Cut key
KEYCODE_CUT = 277
Copy key
KEYCODE_COPY = 278
Paste key
KEYCODE_PASTE = 279
Consumed by the system for navigation up
KEYCODE_SYSTEM_NAVIGATION_UP = 280
Consumed by the system for navigation down
KEYCODE_SYSTEM_NAVIGATION_DOWN = 281
Consumed by the system for navigation left
KEYCODE_SYSTEM_NAVIGATION_LEFT = 282
Consumed by the system for navigation right
KEYCODE_SYSTEM_NAVIGATION_RIGHT = 283
Источник