this says it all: https://cdn1.hubspot.net/hubfs/2564010/The%20activity%20and%...
and it gets worse with every release
this says it all: https://cdn1.hubspot.net/hubfs/2564010/The%20activity%20and%...
and it gets worse with every release
Every UI Toolkit has something similar.
Same events for IOS: https://developer.apple.com/documentation/uikit/app_and_envi...
it was designed for phones with 4mb of memory that need to serialise their entire state everytime a form (activity) disappears because they don't have enough memory and google were too lazy to implement it in the OS
as a result you need to implement masses of error prone boilerplate crap for each and every activity, and nearly everyone gets it wrong in subtle ways
rotate your screen? better implement that serialisation perfectly else the user will lose state when they rotate their device
a lot of apps just disable features like rotation, because they're too time consuming to implement (and a nightmare to test)
This even led to the point where a huge amount of iOS apps simply banned rotation support to not deal with it.
It's just a different tradeoff. The underlying issue is that developers don't want to deal with storing the state which causes issues on lower end devices, which start to break as users multitask. The Android tools for that also aren't all that great - although I also haven't really seen any other toolkit do it better.
That said, I agree. Rotation should not be conflated with general app suspension. They are two different concerns. iOS does this.
This is literally how iOS and other mobile toolkits work as well.
e.g. Look at this issue[1] of Fragments in the LinearLayout, every now and then with the update of the SDK; the order of fragments changes i.e. with one SDK version the fragments are displayed in the order it was added 1,2,3,4 and with an update to SDK the order is 4,1,2,3 or any other.
For issues like this, every time I updated the SDK I had to spend lot of effort in testing and mitigating issues which were unwarranted. Meanwhile, my colleagues(whom I trained) who developed the same application for iOS didn't face such issues with API/Toolchain i.e. in iOS development what doesn't work, don't work and there is no hidden surprise with each SDK/Build Tools/NDK etc. updates because they are not updated separately.