W
W
WordPress WooCommerce2017-04-18 11:29:39
Android
WordPress WooCommerce, 2017-04-18 11:29:39

How to automatically terminate a third-party application on an event or timer?

Is it possible to make an automatic termination of a third-party application in Android based on some event or activity timer?
Example:
1. a taxi driver uses 3 applications at once: Yandex, Uber, Gett
2. accepts an order in Yandex Taxi - you need to automatically close Uber and Gett
3. completes the order
4. opens Uber - waits for an order - accepts an order
5. Yandex Taxi closes automatically and Gett
6. opens Gett - takes an order
7. closes Yandex Taxi and Uber
Ideal solution:
- somehow hook on the order acceptance event in one application
- if the event is caught - automatically close other applications
The solution is less than ideal:
- leave the active application running
- applications that are in the background after 1 minute shoot off
Why is this needed?
The driver works in 3 applications. When there is a downtime in one, he looks at orders in others. Catches an order. But sometimes you can get confused and forget to turn off other applications. In this case, applications begin to arrive there, they are ignored, because of this, the driver receives fines.
I would like to understand whether it is technically possible to set up auto-closing applications when accepting an order in one.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
one pavel, 2017-04-19
@onepavel

you need to get the id of the application processes and kill them
, but to intercept in which application the order was taken on the go, it’s
better not to think of three buttons on the screen and a button to kill the application

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question