I have an app which the moment the user starts running the app it register a new entry in a database. The thing is that when the user quits I would like to delete this registry in the database. I know doing al these inserts and deletes with JSON, MySQL and PHP but I dont know how to apply these functions when the user quits the application in the normal way. I would like to know if there is a function like public onBackPressed() where it does always the same thing but you can overwrite it.
Thanks