android - How to control a Service from both remote and local? -


i have situation: app has local service(used pool slave devices), app able start or stop pool. however, other authorized apps have ability start or stop pool, , when so, alse passes values service(such slave address). how can control service both remote , local, have conflicts?

if have 2 functions perform start , stop operations in app, like:

public startpool(string address){} public stoppool(string address) {}

then there high chances of conflict if called multiple threads. conflict can handled 2 approach :

  1. synchronization
  2. using looper queue request, happens in serial fashion.

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -