Script to Exit Game on Android

Dear all,

we tried to implement an exit button within our game (an escape room adventure in the Sherlock universe). This is quite easy for a PC version but it does not work at all on android.

We already tried the following Script Commands:
  1. SceneManager.exit();
  2. window.close(this)
  3. close.bind(this)
  4. SceneManager.popScene(); SceneManager.exit();
  5. this.finishAffinity();
  6. finishAndRemoveTask();
  7. getActivity().finish();
  8. System.exit(0);
  9. int pid = android.os.Process.myPid(); android.os.Process.killProcess(pid);
The game crashes upon using code no. 1. In the other cases (even no. 4), the command is simply ignored; without any error message.

For deployment we use the "Altlimit Android Client".

We would be grateful for any ideas...

EDIT: We did use SDR Super Tools, which is known to interfere with the SceneManager.exit-command when in playtest mode. However, the problem occurs in the deployed version as well and it also remained after deactivating/deleting the plugin.
Any ideas? P-l-e-a-s-e
I have the same problem, does anyone know how to fix it? I am not convinced by the return button that comes by default on phones

Original thread: https://forums.rpgmakerweb.com/threads/script-to-exit-game-on-android.143916/