TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Android game need quit button
Pages:
1
Android game need quit button
mariosat
Posts: 18
June 01, 2013, 05:36:58 am
im developing an android game and i want an quit button to stop the game.when i got out of the game wih my back key on my mobile the game still run in background pleas help
KreationsDesign
Posts: 102
August 07, 2013, 09:35:05 am
I am wondering the same thing...
Neotron
Posts: 475
March 24, 2014, 01:01:07 pm
Really Stencyl does not provide any way to exit from Android app? Any idea?
Rares
Posts: 216
March 24, 2014, 01:04:44 pm
Who does use buttons provided by the game to exit the game anymore? I mean really, most games do not have quit buttons, you just use the ones from Android.
Last version (0.1.5) of my now cancelled game:
http://www.stencyl.com/game/play/27241
ahmadoweda
Posts: 310
March 24, 2014, 03:08:53 pm
I'm asking for the same thing
Floppy Bird Seasons - Android
Floppy Bird Seasons - Facebook Page
id8games
Posts: 205
March 24, 2014, 03:28:32 pm
If you go to Settings > Mobile > User Input, there is a switch to"Override Back Button".
See this article:
http://community.stencyl.com/index.php/topic,21520.0/topicseen.html
My only problem with this solution is even though you can Override the back button, and setup for example the Escape key to go back to the "Menu" screen in your game - there should be an option that if you press the back button again, it quits the game.
Right now the option in the Mobile > Input, just overrides the back button.
Anyone know how to actually quit a game on Android?
GuyCockcroft
Posts: 193
March 24, 2014, 04:03:46 pm
I'm not sure if this is the official way, but I managed to do this by adding a code block that fires off this line of code when you hit the "quit" button:
nme.system.System.exit(1);
This doesn't actually shut down the app, but it does kick you out to Android.
Neotron
Posts: 475
March 25, 2014, 06:24:14 am
Oh, interesting! And where you added this code?
Flow > Advanced section and Code:?
GuyCockcroft
Posts: 193
March 25, 2014, 08:00:49 am
Yep.
Tahaali54
Posts: 7
August 28, 2014, 12:54:54 pm
Thanks a bunch Buddy! =D
momotarot
Posts: 8
January 01, 2015, 03:46:48 pm
To really quit the android app. Try this:
nme.Lib.exit();
Pages:
1