Gioco non uscire in AndEngine
Domanda
Il pulsante di uscita del mio gioco
ho usato
System.runFinalizersOnExit(true);
System.exit(0);
Inoltre ho provato solo
finish();
in uscita gioco, ma la sua non funziona il gioco esce e si riavvia di nuovo. Può uno mi aiuto con questo problema qual è la soluzione?
Soluzione
Android (and some other mobile platforms, plus web) do not have a concept of "exiting" the app. User just goes to another app's activity and the system (eventually) clears the process from memory.
When your Activity is leaved it gets notified via lifecycle callbacks. There you can do cleanup if necessary.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow