Update II
: an error occurs with Dev Preview 5.1 when the Google soft keyboard does not appear at all .
Update
: Starting with Dev Preview 4, the Android Things image comes preloaded with com.google.android.inputmethod.latin
. If you intend to use the app for a 3D party, then the approach is still valid.
You must enable IME in the Android Things Developer Preview for it to appear. Consider the Google Keyboard
example as an example (since it worked for you). After the keyboard is installed and you are shell
-ed in (with adb shell
), you can use the following options:
Command line solution
Find out the IME ID
$ ime list -a | grep mId
Enable IME using fully qualified mId
Android Things 0.5+ (you can get already enabled
)
$ ime enable com.android.inputmethod.latin/.LatinIME
Android Things 0.1 - 0.4:
$ ime enable com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME
Note. If you want to use the IME "application" (not the "system-wide"), use the ime set ID
instead of the ime enable ID
.
Application settings
Android Things 0.5 +:
am start -n com.android.settings/.Settings\$SystemDashboardActivity
Languages & Input
→ Virtual keyboard
→ Manage keyboards
and enable IME (must be enabled)
Android Things 0.1 - 0.4:
am start -n com.android.settings/.Settings\$InputMethodAndLanguageSettingsActivity
Virtual keyboard
→ Manage keyboards
and enable IME
Note. To close the _Android_ settings application from the shell
, you can emulate the back button several times using input keyevent 4
or force closing the application using am force-stop com.android.settings
.
source share