I'm developing an IME keyboard app for Android devices. I found that even when I open an app without clicking on an EditText widget, the onStartInput
method of my app would be called. Basically for any app start (it doesn't matter which app I switch to, WhatsApp, Chrome, etc.), my IME keyboard app would be started and thus kept alive persistently. I read from here that
Although Android gives focus to the first text field in your layout when the activity starts, it does not show the input method.
So I thought by default an activity start shouldn't trigger my IME input app. What is the expected behavior? Should I expect my IME input app to be invoked upon activity start even when there is no EditText in focus?