Search found 343 matches

by Kasperelo
Sat Jan 23, 2016 7:40 pm
Forum: Support and Development
Topic: How to cleanly exit game on Android
Replies: 5
Views: 3244

Re: How to cleanly exit game on Android

bobbyjones wrote:If stopping the music doesn't work then maybe that's the issue rather than how to cleanly exit. Unless love.focus isn't working on all devices. Which do you think it is?
Stopping the music works, and my example works on most phones. But it doesn't work on my friends Huawei for some reason.
by Kasperelo
Sat Jan 23, 2016 6:47 pm
Forum: Support and Development
Topic: How to cleanly exit game on Android
Replies: 5
Views: 3244

How to cleanly exit game on Android

When I exit my android game, the music still plays. I've tried adding something like:

Code: Select all

function love.focus(inFocus)
    if not inFocus then
        game.exit()
    end
end
... where game.exit() stops all playing sounds and saves the game, but it doesn't seem to work on all devices. Any ideas?
by Kasperelo
Fri Jan 22, 2016 5:01 pm
Forum: Support and Development
Topic: Swiping in Android port
Replies: 6
Views: 4826

Swiping in Android port

So, how does swiping work on love-android-sdl2? I've read a bit about love.touchmoved() but can't really seem to understand it. Any help would be greatly appreciated!
by Kasperelo
Sun Jan 17, 2016 4:46 am
Forum: Support and Development
Topic: App Not Installed
Replies: 1
Views: 1128

App Not Installed

I just finished the basic setup of building android apps on Linux, and now when I try to "ant debug" my project, I get the messgae "App Not Installed" when I try to install the .apk file on my phone.
by Kasperelo
Sun Jan 17, 2016 3:41 am
Forum: Support and Development
Topic: Unable to get debug signature key
Replies: 0
Views: 1132

Unable to get debug signature key

I followed the tutorials on how to set up development on Linux, and it worked on my other computer, but not this one. Now, whenever I try to build my app with "ant debug" I get this error: "Unable to get debug signature key"
What is the cause of this error and how do I fix it?
by Kasperelo
Sun Jan 10, 2016 11:16 am
Forum: LÖVE-Android
Topic: Proper way to exit game
Replies: 10
Views: 73099

Re: Proper way to exit game

Haven't tested stuff on mobile yet; however, I would use love.event.quit() to cause the program to abort and use the love.quit callback for cleaning up resources. Try to use love.event.quit() in the love.focus() callback and see what it does on your friend's Huawei. That is part of my exit() functi...
by Kasperelo
Sat Jan 09, 2016 7:01 pm
Forum: LÖVE-Android
Topic: Proper way to exit game
Replies: 10
Views: 73099

Re: Proper way to exit game

Haven't tested stuff on mobile yet; however, I would use love.event.quit() to cause the program to abort and use the love.quit callback for cleaning up resources. Try to use love.event.quit() in the love.focus() callback and see what it does on your friend's Huawei. That is part of my exit() functi...
by Kasperelo
Wed Jan 06, 2016 6:06 pm
Forum: LÖVE-Android
Topic: Proper way to exit game
Replies: 10
Views: 73099

Re: Proper way to exit game

Yeah, my current code looks like this:

Code: Select all

function love.focus(focus)
    if not focus then
        exit()
    end
end
where exit is the code for stopping all sounds and exiting the game. However, that only seems to work on some phones, like my Xperia Z1, but not my friend's Huawei.
by Kasperelo
Wed Jan 06, 2016 2:40 pm
Forum: LÖVE-Android
Topic: Proper way to exit game
Replies: 10
Views: 73099

Proper way to exit game

When I press the home button on my phone, the background music of my game keeps on playing. What is the proper way to exit the game whenever the user leaves it?