1

I am developing a IME keyboard which will have a automobile dial pad as the input handler in android. More clearly, the dial pad turns decide which alphabet to select.if the dial pad is pointed to "a" and then click the center button of the dial pad, it selects alphabet "a". But my question is, is there a way i can have both hardware and software keyboards active consecutively? My need is, My dial pad soft keyboard comes up and then i need to test it by right and left arrow of the hardware keyboard.

Thanks in advance

JVN
  • 239
  • 2
  • 16
  • Hi I don't know if this is a programming issue. I implemented a RDSI scanner for my android device and it's working as an external hardkeyboard and it was automatically recognized, You must go to settings in android and enable both keyboards after you plug it. – acostela Jun 16 '15 at 10:56
  • @acostela in my case, once the hardware keyboard is connected, the software keyboard is not coming up even if i click any of the text edits. but rather, i am able to type from the hardware keyboard. – JVN Jun 16 '15 at 11:36
  • have you checked what I said about entering in settings inputs and activate both keyboards? – acostela Jun 16 '15 at 11:41
  • @acostela i have solution to fix this from the UI of settings. But i need to do this in code. so that by default the soft keyboard comes up even if the hardware keyboard is present. – JVN Jun 23 '15 at 10:16

2 Answers2

1

For future users- if you're implementing your own keyboard you can override boolean onEvaluateInputViewShown in InputMethodService. This function controls if the keyboard is shown, and the default implementation is to return false if a hardware keyboard exists. Change it to return true and it will work.

I don't know a way to do it from inside of an app.

Gabe Sechan
  • 90,003
  • 9
  • 87
  • 127
  • thanks i will try this method to make it part of build. – JVN Jun 23 '15 at 09:42
  • i modified the code to make onEvaluateInputViewShown() return true. but still it shows that the hardware physical keyboard is ON. please recheck . thanks – JVN Jun 23 '15 at 10:09
  • hey my wrong...even though it shows ON in the settings UI, the soft keyboard comes up automatically even thought the hardware keyboard is present. thanks @Gabe Sechan. i will mark yours as correct answer. – JVN Jun 23 '15 at 10:24
0

for navigation part, i found the solution. go to settings->input -> default-> disable the hardware physical keyboard. then if any text edit is used, the soft keyboard comes up and then we can use the physical keyboard to navigate. (only navigation) .

JVN
  • 239
  • 2
  • 16
  • this is a fix from the UI of settings. but code wise Mr.Gabe Sachen has given right answer. – JVN Jun 23 '15 at 10:26