You can start an activity from a broadcast receiver, see the below
example code:
public void onReceive(Context context, Intent intent)
{
Intent i = new Intent(context,<ACTIVITY_CLASS_TO_BE_LAUNCHED>);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context..startActivity(i);
}
On Dec 8, 11:10 am, feng tian <[email protected]> wrote:
> Hi, All:
> I found that the "onReceive" of broadcast intent can't start an activity
> explicitly. Is there any way to start an activity when I receive a
> broadcast?
> eg: I need an interaction UI with user when specific package has been
> installed in the system.
>
> With many thanks.
>
> BR, Feng
--
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