I played all day with the states, trying to understand why, when I press the power button to open the lock screen, my application loses focus and calls it onStop () (as it should), but then it calls onStart () again, until the hte screen does not go out. This causes me a problem because some sounds in my application (and presumably other things) start playing again when the lock screen is active.
How can I make sure it is properly shaded and stopped when the lock screen is active?
Hamid source
share