F FJS Active Member Licensed User Longtime User Jun 20, 2015 #1 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
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
NJDude Expert Licensed User Longtime User Jun 20, 2015 #2 To capture the BACK button search the forum, there are tons of samples, however, the HOME button cannot be captured. To do what you want regarding playing music in the background, you will have to use a service. Upvote 0
To capture the BACK button search the forum, there are tons of samples, however, the HOME button cannot be captured. To do what you want regarding playing music in the background, you will have to use a service.
F FJS Active Member Licensed User Longtime User Jun 20, 2015 #3 ok, thank you for your help Could you give us an example with the service in order to manage the music? Upvote 0
ok, thank you for your help Could you give us an example with the service in order to manage the music?
NJDude Expert Licensed User Longtime User Jun 20, 2015 #4 Just move your playback code to a SERVICE Upvote 0