I'm working on a accessibility service that include an IME for Android. It's important to know that is not part of an application (activity, view, etc).
With a certain command, I want to stop writing on a editText when I type letters.
I use the inputConnection to send action to the editor for this behavior with the action: IME_ACTION_DONE
//Inside public class myIME extends InputMethodService
boolean res = false;
InputConnection inputCon = getCurrentInputConnection();
if (null != inputCon)
{
res = inputCon.performEditorAction(EditorInfo.IME_ACTION_DONE);
//res = true, action executed but wrong behavior
}
For a unknow reason, the behavior is that the focus will always go to the next element in the view like the behavior of IME_ACTION_NEXT.
Even if I do this, this will do the same:
inputCon.performEditorAction(987654321); //No existing action ID
The question is, why?