android - Ordered broadcast to Service -


i have use case service work on background , needs notify event 2 activities , 1 service. using ordered broadcast because:

1) if activitya on foreground, handles incoming event , aborts broadcast. way, activityb , service not notified.

2) in case broadcast not aborted, activityb next on line. cancels broadcast if active.

3) otherwise, service deals event.

for that, there broadcastreceiver on each component different priority. service's broadcastreceiver inner static class , <receiver> declared in androidmanifest.xml proper <intent-filter>.

the problem is, pointed out here, don't want eavesdropping broadcasts leaving custom actions on manifest, don't know other means of achieving ordering other using ordered broadcast.

any other options?

you try using android interface definition language communication instead.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -