One user recently complained about a misbehaviour in our Flashcards App - every time he opens his hardware keyboard the app started to show a new question.
This was indeed not intended, but as a matter of design unwanted. By default every time the user slides the keyboard in or out any android app will start a new lifecycle and start over with the onCreate method.
After some research at stackoverflow we figured out one simple, but effective method:
Within the manifest of your application add the the listener for configChanges:
Now every time the keyboard slides out or in the app will use your own “onConfigurationChanged” method. If there is no such method within your activity, nothing will happen and all keyboard in and out events will be ignored.