I thought about implementing kind of a meta-soft-keyboard for android that first checks if a physical keyboard is connected (in my case a dock but bluetooth kbds should also be possible) and launches a specific other soft-keyboard if there isn’t.
So:
- Is there a way to get a list of all installed keyboards using the android API?
/edit: This seems to be possible using the InputMethodManager - Can I then call a specific one of these keyboards?
- If there is no API solution, can it possibly be done on rooted phones/tablets?
- Or do I have to implement my own full keyboard solution (or possibly fork/improve an existing open source one) that just doesn’t pop up when there’s a physical kbd connected)?
For those having similar troubles:
The best work-around solution I found so far is using the NULL keyboard and the Dock keyboard switcher apps. But the NULL keyboard currently only supports the english layout and the constant keyboard switcher popup gets kind of annoying… (IMO it’s almost easier to just hide the keyboard everytime it appears)
Seems like it can be done by
public boolean switchToNextInputMethod (IBinder imeToken, boolean onlyCurrentIme), but I don’t know is it switching permanently or only for one time and this method is added only in Jelly Bean.