Show soft keyboard even though a hardware keyboard is connected

后端 未结 5 1710
野性不改
野性不改 2020-12-05 07:44

Is there any way to show software keyboard with USB keyboard connected (in my case RFID reader)?
I tried to force show it using InputManager (with these or similar para

5条回答
  •  再見小時候
    2020-12-05 08:01

    If your app has the WRITE_SECURE_SETTINGS permission (available to system apps or Android Things apps) it can set the show_ime_with_hard_keyboard system setting which will enable soft keyboard even if a hard keyboard is plugged:

    Settings.Secure.putInt(getContentResolver(), "show_ime_with_hard_keyboard", 1);
    

提交回复
热议问题