Do not let user close application / or perform an action before closing

Asked

Viewed 422 times

0

Personal in my application the user makes an order, this order gets a status again, I want when it closes the application when it is making the order, the status is changed to canceled and sent to the server. I tried to implement this in onDestroy but it didn’t work.

When I talk close the application is when it displays all open applications and drags the application aside, then it ends up closing.

Or if possible until you don’t let him close the app.

  • The concept of "close", in the terms you refer to, does not exist on Android. The onDestroy method rarely(almost would say never) is called.

  • And when the user displays all running apps, and drags the app somewhere it disappears from the running apps. My services stop.

  • How are you doing the start of services?

  • From what I understood when a user is registering a request, the server keeps the status open, and it waits for the user to confirm or cancel the request to change the status. If that is the case, I think the server doesn’t need to know if the user is making a request, the server should only worry if the user actually confirms the request.

  • Well I need to register this request, because I have another app from the service provider version, which meets this request.

  • The two half communicate at the same time.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.