We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I've done a sketch which runs fine. It plays an mp3 file using the apwidgets library, all fine. The problem is that if I press the home button, it goes to the home screen but keeps playing the mp3... Is there a way to pause the mp3 ? Do I have to detect the home button pressing and do a player.pause() ?
Answers
I don't know APWidgets all that well, but it is certainly possible to detect a home button press. Even better, you can detect any time when your sketch is closed. Append this to your sketch:
Thank you very much Calsign ! I realized it wasn't a problem with apwidgets but with the behaviour of the sketch itself when pausing. Your solution solved all my problems.