android - Driving a service API from a BroadcastReceiver -


i error message when attempt bind onreceive() of receiver local service before drive bespoke api on it.

"intentreceiver components not allowed bind services"

what best way of getting piece of data service while in broadcast reciever.

many thanks.

p.s. need answer synchronously i.e. have wait on answer service callback may not possible.

what best way of getting piece of data service while in broadcast reciever.

if broadcastreceiver created else (e.g., activity) , set registerreceiver(), "something else" should binding service , doing work.

if broadcastreceiver component registered in manifest, need rethink approach whatever problem trying solve. these sorts of broadcastreceivers cannot bind services , cannot spend time doing work. if broadcastreceiver cannot work in less than, say, 10ms, should delegate control service via startservice(). service can work on background thread.

p.s. need answer synchronously i.e. have wait on answer service

see above.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -