Upgraded to 3.1.2 and when I export to android common save quiting doesnt work, is there any other way? does it work for you?:
func _ready() -> void:
get_tree().set_auto_accept_quit(false);
loadState();
func _notification(what):
if what == MainLoop.NOTIFICATION_WM_QUIT_REQUEST or what == MainLoop.NOTIFICATION_WM_GO_BACK_REQUEST:
print("quiting");
saveState();
yield(get_tree().create_timer(.1), "timeout");
get_tree().quit();