Android Default Input Method check multi-language, and default one of the languages

Source: Internet
Author: User

1. First adjust the input method on the device

Settings > Language IME >android keyboard (AOSP), in the input language, tick the language you want to choose, such as "English (United States)" and "Spanish" two kinds:


2. Select the default language for the system input method ("Spanish" in two languages by default)

Open an application that can bring up the input method, in the drop-down notification bar, "Select Input Method" is adjusted to "Spanish"


3. View Setting Database files

ADB pull data/data/com.android.providers.settings/databases/settings.db c \

Open the Secure table, view the contents of the Default_input_method,enabled_input_methods and Selected_input_method_subtype three fields, and record:

Default_input_method com.android.inputmethod.latin/. Latinime

Enabled_input_methods com.android.inputmethod.latin/. latinime;816242702;-921088104

Selected_input_method_subtype 816242702


4. Modify the Settingsprovider file

Frameworks/base/packages/settingsprovider/src/com/android/providers/settings/databasehelper.java

Add the following two lines in the function private void loadsecuresettings(sqlitedatabase db) (note that the Loadsecuresettings function, Not loadsystemsettings):

Loadsetting (stmt, Settings.Secure.ENABLED_INPUT_METHODS, defaultime);            Loadsetting (stmt, Settings.Secure.DEFAULT_INPUT_METHOD, defaultime);

Modify to the following three lines:

Loadsetting (stmt, Settings.Secure.ENABLED_INPUT_METHODS, "com.android.inputmethod.latin/. latinime;816242702;-921088104 ");//Selected Input Method Loadsetting (stmt, Settings.Secure.DEFAULT_INPUT_METHOD," com.android.inputmethod.latin/. Latinime ");//The default input method is the system input Method loadsetting (stmt, Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE," 816242702 "); Default language for Default IME


Android Default Input Method check multi-language, and default one of the languages

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.