How do I tell when a configuration change is happening in Froyo?
<p>In my app, I want a media file to play, and to keep playing if the user rotates the screen (destroying the Activity), but I want it to stop playing if the user moves to a different Activity or another Activity appears over this one, they press the back button, whatever.</p>

<p>I believe there's an API for this in Honeycomb, but I need something that will work in Android 2.2.</p>

<p>I'd rather not use onConfigurationChanged to handle all the configuration changes myself--that sounds like a lot of work and potential bugs--and the issue with onRetainNonConfigurationInstance() is that it doesn't run until after onStop fires--but onPause would be the logical place to pause the media, if appropriate.</p>

<p>Is there a way, in onPause, to tell if the Activity is being paused for a configuration change versus another reason?</p>
