Reputation: 117
Is it possible to launch an activity from bound service on every successful bind. My activity (this remains same for for every bind request received) should get launched in a different task. I would like to retains all the tasks untill the unbind is called on all recieved requests.
thanks,
Upvotes: 0
Views: 169
Reputation: 5278
In the onBind()
method of the service, you could do a startService()
with the Intent
for the activity, which has the ACTIVITY_NEW_TASK
flag set.
But if you want to be very sure of a succesfull bind, then I guess you could do it only from within ServiceConnection
's onServiceConnected()
method. I don't know of a way where the service can know about a successfull bind.
Upvotes: 1