android - Is using LocalBroadcastManager the most appropriate way to send app-wide events? -
i'm wondering if localbroadcastmanager
better method calls objects
subscribed event publisher, , if overhead (if any) worth it.
i'm working on chat app, , sample process includes passing newly-received raw message sqlite
database archive, alerting activity
database has been updated can new collection of messages. right now, happens once messagereceiver
gets new message, has databaseinterface
add message database, alerts activity
via method call. far know, couples messagereceiver
, activity
, and, if recall correctly, that's bad. liked idea of using guava eventbus, currently, recent android api 8-compatible release (11.2) has beta version. thought of implementing own using handlers
, remembered broadcastreceiver
, stuff.
yes, think use case localbroadcastmanager
, use in case.
Comments
Post a Comment