Hi,
I have a service (input method) and from within that service I want to
start and activity which was declared in the same manifest. The
activity maybe running but in the background.
How do i check its presence and bring it to front, or optionally start
this.
>From what I can gather from other posts, this is about what I need to
do:
Intent i = new Intent(this, myActivity.class);
i.setAction(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_LAUNCHER);
ComponentName cn = new ComponentName(this, myActivity.class);
i.setComponent(cn);
// i.addFlags(FLAG_ACTIVITY_REORDER_TO_FRONT);
// i.setFlags(FLAG_ACTIVITY_CLEAR_TOP);
// i.setFlags(FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
I don't knwo which of thest flags pertain to what I need to do. The
docs are quite merky, and my random attempt at making this work
failed.
What's the right way to do this, anyone?
--
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