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.
– ramaral
And when the user displays all running apps, and drags the app somewhere it disappears from the running apps. My services stop.
– Mateus Carvalho
How are you doing the start of services?
– ramaral
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.
– Skywalker
Well I need to register this request, because I have another app from the service provider version, which meets this request.
– Mateus Carvalho
The two half communicate at the same time.
– Mateus Carvalho