How to add keyboard languages to Android Things 1.0.15

135 Views Asked by At

I need to add languages to AOSP keyboard in Android Things version 1.0.15.

When I try to modify the language pressing long the button (",") next to the spacebar the app crashes:

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.INPUT_METHOD_SUBTYPE_SETTINGS flg=0x14200000 (has extras) }

I tried to install other keyboards such as gboard or swiftkey with no success. I am not able to start those apps.

Do you know some other workaround?

1

There are 1 best solutions below

0
Daniele On BEST ANSWER

I solved installing Gboard and then select the keyboard programmatically using the following code:

    InputMethodManager inputMethodManager = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE);
    inputMethodManager.showInputMethodPicker();