Frage

I am building a game using corona sdk. Inside the game, at the menu, I have an EXIT button. I want to know how I can quit the application and get to the mobile home screen or mobile menu? In other words, what should I write inside the onExitButtonClicked(event) method?

The application/Game is not resume able.

War es hilfreich?

Lösung

You can ( but should not ) call os.exit() or on Android call native.requestExit().

Normal apps do not quit, the user just switches app or kills the app.

You can find more documentation here: http://docs.coronalabs.com/api/library/os/exit.html

Andere Tipps

It worked. Thanks a lot. It is better to code this way.

function quit() 
 os.exit() 
end 
timer.performWithDelay(1000,quit)

So, now it won't look like a crash.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top