Android Question keycodes options

FJS

Active Member
Licensed User
Longtime User
Hello everyone!

I would like to know the how to detect the following cases:

1 - If the user presses back button
2- If the user presses home button and the app is not visible

I need to know this information, in order to management the music between activities. The idea is not stopping the music when you close one activity and open the next one, however, I would like to stop the music when the app is not visible.

Thank you very much for the support

Best regards
 

FJS

Active Member
Licensed User
Longtime User
ok, thank you for your help

Could you give us an example with the service in order to manage the music?:)
 
Upvote 0
Top