android - How to send an intent to an activity and read extras from it? -
there's service runs , listens events, push them log someday. display events in main actvity when it's running, how send event details activity? don't receive intent itself, when send activity context.startactivity()
, can't retrive data intent.getxxxextra()
.
(the activity "subscribe" , "unsibscribe" events in onstart() , onstop() intent sent service, events wouldn't open activity if it's not in foreground)
or there other way send data (20-30 characters long string) service intent?
issue broadcast service , implement private broadcastreceiver in activity.
Comments
Post a Comment