Page 1 of 1

(Solved)(Android) How to know when my game gets in background?

Posted: Thu Feb 04, 2016 2:48 pm
by s0ft
I have a little problem in my game: when the game gets put in background the music keeps playing. I already have a togglePause() function that pauses the game, but I can't find any event or something that tells me when the app is in background even though I've been googling for an hour or so. Does anybody have a solution?

Re: (Android) How to know when my game gets in background?

Posted: Thu Feb 04, 2016 2:58 pm
by Nixola
You should use [wiki]love.focus[/wiki] for that. The current version currently has some issues about android and background though, they'll be fixed in 0.10.1.

Re: (Android) How to know when my game gets in background?

Posted: Thu Feb 04, 2016 3:06 pm
by s0ft
Alright! Thanks for the fast response! :)