I’m required to follow the proper audio handling as described in the following blog post:
http://android-developers.blogspot.com/2011/11/making-android-games-that-play-nice.html
For my app, I will need to take the approach described at the bottom of the above blog post:
1. Pause playback when you receive onPause().
2. When you receive onResume():
2.1 If you have previously received an onFocusChanged(false) message, wait for an onFocusChanged(true) message to arrive before resuming playback.
2.2 If you have not previously received an onFocusChanged(false) message, then resume audio immediately.
So… I will need to be able to access onWindowFocusChanged. I found it mentioned in native android CoronaActivity related doc page:
http://docs.coronalabs.com/native/android/html/index.html?com/ansca/corona/CoronaActivity.html
I’m not entirely sure for what or for whom this doc page is intended, and unfortunately, I am unable to find any mention of onWindowFocusChanged in the API pages.
I’d appreciate hearing any thoughts on this, as well as suggestions for how we may go about handling audio in a manner that would meet Google Play’s requirement.
Naomi