[Solved] How to exit the game (on android)?


#1

Made the event ( when touch on (exit) > close the game )
But when i exit the whole game stops or pause .

So how to exit the game properly on android ?


#2

Anyone ?


#3

In case the Quit event doesn’t work, try using this code in a javascrpt event:

navigator.app.exitApp();

I have uploaded an example it worked for me on my device:
gametemplates.itch.io/gdevelop-examples

It on the bottom as usual.
Hope it works for you.


#4

It works . thanks


#5

Thank you exactly what I needed.


#6

hi, i have the same problem
where do I put the code “navigator.app.exitApp();” please?


#7

Put it in a JS event.


#8

There is a Action for exit the game :wink:


#9

The point of the topic was closing the page completely as the quit game action just destroys the Renderer and end the game loop, it doesn’t close the app (on mobile).