Great article. In my opinion, losing data due to battery optimization is equally annoying as orientation changes, especially because battery optimization seems to change with every Android release. There are lots of hacks you can use to avoid this problem, but none of them are very safe.