Guys,

I would like to know the reason behind this behaviour.I have a
broadcast reciever and in onrecieve i am trying to start an
activity,however if i am not giving the flags it is giving an
exception .On declaring the flags it is working perfectly fine,why?

I was under the impression that onRecieve runs in the main UI thread
and we can launch an activity in onRecieve.Error given by the emulator
is self explanatory but still why do i need to create an activity in a
new task(only in onRecieve)?

onRecieve {
Intent intent4activity2 = new Intent
("android.intent.action.activity2");
//intent4activity2.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
arg0.startActivity(intent4activity2);
}

regards,
ani

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to