Making Android Games that Play Nice
android-developers.blogspot.com
android-developers.blogspot.com
Waiting for onResume() and onFocusChanged() seems like a possible fix, and it works pretty well in a large number of cases. But even this approach has its Achilles’ heel. If the device falls asleep on its own, or if the user locks the phone and then immediately unlocks it, your app may not receive any focus changed messages at all.
This doesn't give me a lot of confidence in the framework decisions being made by the android team.
1. Pause playback when you receive onPause().
2. When you receive onResume():
2a. If you have previously received an onFocusChanged(false) message, wait for an onFocusChanged(true) message to arrive before resuming playback.
2b. If you have not previously received an onFocusChanged(false) message, then resume audio immediately.
3. Test thoroughly!
The documentation for onFocusChanged might be helpful for you: http://developer.android.com/reference/android/view/View.OnF...
In Firefox I was able to get scrolling by disabling the page style (View->Page Style->No Style). I'd imagine there's something similar in Opera.