The problem of android input method switching

because of the demand, some places can not use Pinyin by default, and do not display the soft keyboard, as long as the hardware button input.

now there is an input box that turns off the display of the soft keyboard, but if the user switches the pinyin input method elsewhere, the soft keyboard will still pop up. You want to automatically switch to English input when you cut to a certain activity.

Apr.10,2022

I found that for security reasons, android does not allow in-code switching of input methods. The pop-up input method can only be modified by the user's choice. This is not what I want.
solution:
1. Hide the soft keyboard
2. Restrict input such as NUMBER because it is hardware input, which does not restrict hardware letter input to other devices.

Menu