Currently our app works as follows: - In onPause() pause audio - In onResume() resumes audio As far as I'm aware this is consistent with how the developer docs describe the Activity lifecycle. In particular, the docs state: "If an activity has lost focus but is still visible (that is, a new non-full-sized or transparent activity has focus on top of your activity), it is paused." On the Kindle Fire if the user presses the sleep button once, the screen is switched off and onPause() is called. However, when the user presses the sleep button again onResume() is called, but the user is presented with the 'locked screen'. At this point the app is not at all visible - but the audio is resume as described above. Why is onResume() called? And how should we be handling this particular case?
Hi Sujoy, Yes - in fact we did solve this issue. Before resuming the audio we used the KeyguardManager to check whether the lock screen was visible: KeyguardManager kgMgr = (KeyguardManager) getContext().getSystemService(Context.KEYGUARD_SERVICE); boolean isLocked = kgMgr.inKeyguardRestrictedInputMode(); Hopefully this will be useful to other developers.