1
votes

I'm testing my app in a samsung galaxy S4 mini and a Sony xperia T. While changing activity from MainActivity to SettingsActivity the sony xperia rises the onDestroy method after the onPause method. Unlike the S4, which rises only the onPause method.Any suggestions to explain this behaviour please?
Sony xperia T android version 4.3
Samsung Galaxy S4 mini android version 4.2.2

1

1 Answers

0
votes

Look at the Activity lifecycle: http://developer.android.com/reference/android/app/Activity.html

Is onStop() called?

onPause() and onResume() are primarily for when an activity is being backgrounded. When you switch to a new Activity the old one is available to be destroyed based on available memory and other parameters. That is it. Some devices will do it sooner rather than later. Assume the lifecycle chart always hold true and make sure your Activities properly handle it.