Android: Keep MediaPlayer running during Activity screen orientation update
I use a MediaPlayer to play an MP3. Currently I disabled screen orientation changes by using android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation" in the manifest. I do want to support landscape mode now - i.e. removed those tags - but have the problem that during the destroy/create cycle the player gets stopped and then restarted. This is okay and I actually do this even manually in onPause() to stop the player when the activity goes in the background. To keep it running during orientation changes now, I tried making it static (and using the Application