Reputation: 123
I am creating a custom keyboard that displays the Bluetooth keyboard input on the device screen for Android (Google TV)
However, the soft keyboard does not appear when you type on a Bluetooth keyboard.
I want the soft keyboard to appear on the screen when I type on the Bluetooth keyboard.
InputMethodManager mgr = (InputMethodManager) getSystemService(context.INPUT_METHOD_SERVICE);
In the above code, Is it possible to force a soft keyboard to be displayed every time I use a Bluetooth keyboard?
It should be applied wherever you use the keyboard, not only for the View.
Upvotes: 0
Views: 190
Reputation: 1505
InputMethodManager inputMethodManager =
(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.toggleSoftInputFromWindow(
linearLayout.getApplicationWindowToken(),
InputMethodManager.SHOW_FORCED, 0);
Upvotes: 1