When I press the back button in MainActivity the home screen is shown, however onDestroy is not being called. Is it a new feature? Using Emulator Pixel 3A in API 33 arm 64-v8a. The same happens through the phone pixel 6A API 33. Also local variables are not deleted.
It should have destroyed MainActivity when the back button is pressed
On Android 12+ Devices, back button doesn't result in (main) Activity being
destroyedinstead app will stay inwarmstate, similar to when exiting using home button.Reason behind this change is now user can quickly resume app from a
warmstate, instead of having to completely restart the app from acoldstate.If you want it function like before then there are two workaround that you can use: