if you press the back button on the startscreen of the activity a dialog pop up and ask you if you really want to close the app, if yes it will send the terminating request to the server if no nothing happen