I am aware of the fact that this problem has been reported earlier and I have used all the recommended solutions but none has helped so far.
As mentioned in the title, onDestroy()
is called every time screen turns off. It doesn't happen if a service is ON.
Application has fixed orientation and hence
android:screenOrientation="portrait"
As per some earlier suggestions, I added
android:configChanges="orientation|keyboardHidden"
etc. I also implemented onConfigurationChanged()
but it never gets called.
Two important points:
- We are facing the problem only on one device in our test setup, Samsung Duo running 4.0.4. On all other devices, this is not an issue.
- This issue is not happening with other apps running on the same device.
Will appreciate your help.
Thanks
Update: It seems that setting these flag is causing the issue. Removing them solves but they were used for a reason so any other insight will be appreciated.
Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NO_HISTORY