Android Virtual Keyboard Developer Guide

The Panasonic Android Virtual Keyboard (VKB) is a multilingual predictive virtual keyboard with handwriting support for Chinese languages. It allows passengers to set their native language and can be customized. The VKB is based on the IQQI Virtual Keyboard.

To customize the VKB, use Config Tool 2.0 to set the colors and language, then create a content loadable, which will contain a VkbResource.apk file, with the package name aero.panasonic.vkbresource.

The Content Loadable Package Definition is created per Aircraft Configuration.

Prerequisites

You will need to do the following:

  • Verify your access to Config Tool 2.0 and check if your profile has access to the Android VKB content setup.

  • Request a baseline VKB resource import.

    For additional information, please contact your Panasonic focal.

  • Verify the content loadable has an assigned unique Part Number.

    When you create a CLPD in Config Tool 2.0, there is a checkbox option to automatically request a part number or manually request an existing part number. However, we recommend not changing your part number and leaving this checkbox unselected.

Handwriting Support

The Panasonic Android VKB supports handwriting input for Chinese languages. If this is enabled, you can additionally configure the length of time to wait before performing character recognition through the pen_wait_time parameter.

To enable handwriting input, the interactive needs to both enable and set vkb_handwriting to be the default input method editor (IME) by doing the following:

try {

    Log.d(TAG, "Enable " + ime);

    privilegeBroker.enableIME("aero.panasonic.vkb_handwriting/.IMEService");

    privilegeBroker.setDefaultInputMethod("aero.panasonic.vkb_handwriting/.IMEService");

} catch (RemoteException e) {

    e.printStackTrace();

}

Supported Keyboard Locales

available_locales is a configuration item containing a list of languages that display in the VKB language selection dialog to set the keyboard language. Local codes must be exact and case-sensitive. The list is ordered and will display in the exact order of the configuration. For example:

<string-array name="available_locales" ict:type="enum">
    <item>it</item>
    <item>en</item>
    <item>zh_cn</item>
    <item>vi</item>
    <item>es</item>
</string-array>

The above will display in the exact following order:

  • Italian
  • English
  • Pinyin
  • Vietnamese
  • Spanish

For language codes, refer to Languages and Local Codes.

Default Configuration Values

The default keyboard settings for system, such as the NEXT Crew Terminal (CT) are as follows.

Languages and Local Codes

The following can be set in available_locales. For more information, refer to Supported Keyboard Locales.

Language NameLocal Code
Arabicar
Brazilianpt-br
ChangeJie (traditional)zh_hk
Dutchnl
Englishen
Frenchfr
Germande
Hebrewiw
Hindihi
Icelandicis
Indonesianid
Italianit
Japaneseja
Koreanko
Malayms
PinYin (simplified)zh_cn
Punjabipa
Portuguesept-pt
Russianru
Spanishes
Thaith
Turkishtr
Urduur
Uzbekuz
Vietnamesevi
ZhuYin (traditional)zh_tw
Traditional Chinese handwritinghw_zhtr
Simplified Chinese handwritinghw_zhsi

String Values

NameTypeDescriptionDefault Value
app_nameStringName of the application.PanasonicVkbResource
candidate_fontsizeEnum

Font size of text.

Valid values:

  • smallest
  • small (default)
  • medium
  • large
  • huge
small
default_languageEnumDefault language.en
default_system_language_supportBooleanEnables the VKB to change its default language to match with the device language.true
emoji_enabledBooleanEnables or disables emoji input.false
japanese_layoutEnum

Sets the Japanese keyboard layout.

Valid values:

  • romaji (default)
  • hiragana
  • full (both Romaji and Hiragana layouts)
romaji
key_fontsizeEnum

Font size of keys in the keyboard.

Valid values:

  • smallest
  • small
  • medium
  • large (default)
  • huge
large
keyboard_height_landscapeIntHeight of the keyboard in landscape mode.40
keyboard_height_portraitIntHeight of the keyboard in portrait mode. 50 
pen_wait_timeIntLength of time in milliseconds to wait before performing letter recognition. Optional and can be set if handwriting support is enabled.1000
text_toolbox_enabledBooleanEnables or disables text toolbox.true

Color Values

NameTypeDescriptionDefault Value
candidate_first_colorColorText color for the first suggested word.#28c1b8
candidate_mark_colorColorText color of the suggested symbol besides the first symbol.#999999
candidate_normal_colorColorText color of the suggested text besides the first word.#FFFFFF
candidate_number_colorColorText color of the suggested number besides the first word.#FF0000
candidate_searchtyping_colorColorText color of the suggested typing search text color besides the first word.#FFFF00
candidate_touch_colorColorText color when suggested text is touched.#46474c
colorAccentColorAccent color.#FF4081
colorPrimaryColorPrimary color.#3F51B5
colorPrimaryDarkColorPrimary dark color.#303F9F
filler_box_background_colorColorBackground color for the suggested text area.#FF242424
key_divider_colorColorColor of the key divider.#000000
key_function_colorColorBackground color of function keys, such as Enter and Space.#ffB6B6B6
key_function_focused_colorColorBackground color of function keys when focused.#ff28c1b8
key_function_pressed_colorColorBackground color of function keys when pressed.#ff28c1b8
key_function_text_colorColorText color of function keys.#FFFFFFFF
key_normal_colorColorBackground color of normal keys.#ff242424
key_normal_focused_colorColorBackground color of normal keys when focused.#FF28C1B8
key_normal_pressed_colorColorBackground color of normal keys when pressed.#FF28C1B8
key_text_colorColorText color of keys.#FFFFFFFF
lang_dialog_cancel_btn_border_colorColorColor of the border around the cancel button.#5A5A5A
lang_dialog_cancel_btn_focused_colorColorBackground color of the cancel button when focused.#FFBF00
lang_dialog_cancel_btn_normal_colorColorBackground color of the cancel button.#E5E5E5
lang_dialog_cancel_btn_pressed_colorColorBackground color of the cancel button when pressed.#FFBF00
lang_dialog_cancel_btn_text_colorColorText color of the cancel button.#000000
lang_dialog_list_item_background_colorColorColor of the language entry background.#FF242424
lang_dialog_list_item_divider_colorColorColor of the language entry divider.#000000
lang_dialog_list_item_focused_colorColorColor of the language entry that has handset focus. If not specified, this is set to the value of key_normal_focused_color.#FF28C1B8
lang_dialog_list_item_text_colorColorColor of the language entry text.#FFFFFF
lang_dialog_list_title_background_colorColorBackground color of the list title.#5A5A5A
lang_dialog_list_title_text_colorColorText color of the list title.#FFFFFF
lang_dialog_title_background_colorColorBackground color of the language selection title.#0000ff
lang_dialog_title_text_colorColorText color of the language selection title.#ff0000

Examples of Configured Color Values

key_function_pressed_color

Keyboard with pressed function key background color
Keyboard with pressed function key background color

key_function_text_color

Keyboard with function key text color
Keyboard with function key text color

key_normal_color

Keyboard with normal keys background color
Keyboard with normal keys background color

key_normal_pressed_color

Keyboard with a pressed normal key background color
Keyboard with a pressed normal key background color

key_text_color

Keyboard with normal keys text color
Keyboard with normal keys text color

lang_dialog_cancel_btn_border_color

Language dialog with cancel button border color
Language dialog with cancel button border color

lang_dialog_cancel_btn_focused_color

Language dialog with focused cancel button background color
Language dialog with focused cancel button background color

lang_dialog_cancel_btn_normal_color

Language dialog with cancel button normal color
Language dialog with cancel button normal color

lang_dialog_cancel_btn_pressed_color

Language dialog with pressed cancel button color
Language dialog with pressed cancel button color

lang_dialog_cancel_btn_text_color

Language dialog with cancel button text color
Language dialog with cancel button text color

lang_dialog_list_item_background_color

Language dialog with list item background color
Language dialog with list item background color

lang_dialog_list_item_divider_color

Language dialog with list item divider color
Language dialog with list item divider color

lang_dialog_list_item_text_color

Language dialog with list item text color
Language dialog with list item text color

lang_dialog_list_title_background_color

Language dialog with list title background color
Language dialog with list title background color

lang_dialog_title_text_color

Language dialog with title text color
Language dialog with title text color

Customize the VKB

Change Configurations and Colors

To customize the VKB, edit the existing VKB android_vkb_resources theme in Config Tool 2.0:

  1. In the left navigation menu, select Themes.

  2. Select android_vkb_resources from the list of themes.

    Config Tool Themes page with android_vkb_resources theme highlighted
    Config Tool Themes page with android_vkb_resources theme highlighted
  3. On the Properties page, select the values directory.

    Config Tool Theme Properties with values directory highlighted
    Config Tool Theme Properties with values directory highlighted
  4. Select the colors or strings directory to view and modify the configurable options in the theme.

    Config Tool Theme Properties with colors and strings directory highlighted
    Config Tool Theme Properties with colors and strings directory highlighted

    For configurable options, refer to Default Configuration Values.

Change Default Language

To change the default language:

  1. Select the strings directory.

    Config Tool Theme Properties with strings directory highlighted
    Config Tool Theme Properties with strings directory highlighted
  2. Locate the default_language property, then select Edit.

    Config Tool Theme Properties with default_language property value highlighted
    Config Tool Theme Properties with default_language property value highlighted
  3. Modify the Value (main) field by selecting a different language from the dropdown, then select Update.

    For language local codes, refer to Languages and Local Codes.

    Config Tool Edit Theme Property Values page with value highlighted
    Config Tool Edit Theme Property Values page with value highlighted
  4. Select Update.

Create a Theme Version

To create a version:

  1. In the theme, select the Versions tab.

    Config Tool Theme Properties page with Versions tab highlighted
    Config Tool Theme Properties page with Versions tab highlighted
  2. Select Create Version.

    Config Tool Theme Versions page with Create Version button highlighted
    Config Tool Theme Versions page with Create Version button highlighted
  3. Add a Version and an optional Comment.

    Config Tool Add Version page
    Config Tool Add Version page
  4. Select Add.

Create Content Loadable

To create a content loadable:

  1. In the left navigation, select Content Loadables.

  2. Select Android VKB.

  3. Select Prepare Loadable, then select Create to confirm initializing the content loadable.

    Config Tool Content Loadable page with Prepare Loadable button highlighted
    Config Tool Content Loadable page with Prepare Loadable button highlighted
  4. The most recent Theme version displays by default. Select Edit Comment to add a comment if needed.

    Config Tool Content Loadable page with Edit Comment button and Theme highlighted
    Config Tool Content Loadable page with Edit Comment button and Theme highlighted
  5. Select Create Loadable.

  6. Locate the loadable on the Jobs page.

    Config Tool Jobs page
    Config Tool Jobs page