onActivityResult with BroadcastReciever
So in my main Activity, using Intent, I start some Service object, which
responds to some system event (and runs in a background of course) and
sends a proper message to a registered BroadcastReciever in the main
activity. What I try to do is to startActivityForResult in the onReceive
method in the broadcast receiver. The activity I'm interested in launching
in onRecieve is some other app, which processes my data (which is sent by
the service to broadcast receiver) and returns back a success/failure
message.
The problem is, that onActivityResult which is supposed to obtain the
success/failure message, runs only when I open the main activity. What I
want to do, is to get the result independently of whether my main activity
is on the top or running in background (not on top of the stack). In other
words, I want onActivityResult to be executed in the background.
I'm stuck with this problem for a while, and I would appreciate any help.
No comments:
Post a Comment