I have written a media player app for Android. I have long been considering to tackle the headaches of onSaveInstanceState and onRestoreInstanceState, and then found that there is an easy way to prevent activity restarts on screen rotation: Using android:configChanges="orientation|screenSize"
inside the <activity>
tag. It works pretty well for my activities to be honest. However, I am not sure if this always be fine and create no issues for the app being developed in the future. By the way, I remember some warnings on using this posted on Android Developers.
Remember: When you declare your activity to handle a configuration change, you are responsible for resetting any elements for which you provide alternatives. If you declare your activity to handle the orientation change and have images that should change between landscape and portrait, you must re-assign each resource to each element during onConfigurationChanged().
Any ideas?