Reputation: 9
The Android browser gets refreshed within my app when the keyboard (Android version devices which have a flip keyboard) is pulled out and the app loses cetain elements. How can we prevent the browser to be refresh.
Upvotes: 1
Views: 414
Reputation: 11946
When the phone is flipped out, the active activity is closed and reopened. You need to use OnSaveInstanceState and onRestoreInstanceState to persist your data and restore it when this happens.
UPDATE: You can also take a look at this thread for more info: How to stop android activity destruction
Upvotes: 2