Android: Is there any way to turn on-off the physical keyboard programmatically?

后端 未结 1 736
我寻月下人不归
我寻月下人不归 2021-01-21 18:01

I have an android 3.1 with usb host capabilities. I connected to it via usb an RFID reader that works as a keyboard emulator. For keyboard emulator I mean that once I scan a tag

相关标签:
1条回答
  • 2021-01-21 18:35

    Have you got any editText or similar to get the focus this way?

    someEditText.requestFocus();
    InputMethodManager mgr = (InputMethodManager)getActivity(). 
    getSystemService(Context.INPUT_METHOD_SERVICE);                 
    mgr.showSoftInput(someEditText, InputMethodManager.SHOW_IMPLICIT);
    

    I mean, if you do this after plugging your RFID reader, the keyboard should appear. Did you try this?

    0 讨论(0)
提交回复
热议问题