I want to check if the native / hardware keyboard is used, and also, if possible, I want to disable third-party keyboards.
My goal is simple. I only use the Android built-in soft keyboard to enter values into my edit fields, and no other keyboard should be able to
thanks
EDIT
I know that it’s not good to do what I'm trying to do, I know that the main idea of an android is to have intentions and actions and services that know how to process certain types of intentions in accordance with the intent filter. But this is an exception in every rule, especially when we talk about security.
I want to disable all third-party keyboards, and if this cannot be done using some kind of API or something like that ... are there any ways to solve this problem?
EDIT
String s=Settings.Secure.getString(getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
This returns the current input method (keyboard), but I need something like a "system keyboard", and I do not see such a flag: - (.
List<InputMethodInfo> list = m.getInputMethodList();
One possible solution is to take list [0] as the keyboard I’m looking for, but I don’t want to relay by order (except when the order is guaranteed that the keyboard with index 0 is the one that comes to install from the phone)
this is the value of the list
[InputMethodInfo{com.htc.android.htcime/.HTCIMEService, settings: com.htc.android.htcime.HTCIMESettings}, InputMethodInfo{com.volosyukivan/.WiFiInputMethod, settings: null}]