You can't do this with apps started from launcher, since the icon represents a concrete app (the exact app is set in the intent), so there will never be a point where there is another possible app to run.
This approach is for intents that are abstract -- such as "view this data" -- for which there could be multiple apps that can perform the action. On Thu, Sep 23, 2010 at 6:04 AM, Dirk Vranckaert <[email protected]>wrote: > I found this in the emulator logging upon opening the message > application: > > 09-23 12:45:32.149: INFO/ActivityManager(582): Starting activity: > Intent { action=android.intent.action.MAIN > categories={android.intent.category.LAUNCHER} flags=0x10200000 > comp={com.android.mms/com.android.mms.ui.ConversationList} } > > So I can use the action and category part of the intent (which is not > surprising the same same for any application) but I should also be > able to use the comp part in order to know which application is > launching. Is there anyway to achieve this? > > Dirk > > On Sep 23, 1:54 pm, Dirk Vranckaert <[email protected]> wrote: > > Hey, > > > > I'm walking around with a little idea for a new Android app although I > > have my doubts weather it's possible or not. So that's why I came > > here. > > > > What I want to do is this: A users uses his phone and suddenly he > > wants to open his messaging application. Now instead of opening that > > application I would like to intercept it, do some stuff of my own, and > > then let the messaging app open. > > > > Is it possible to do so? And if it is, could you guys give me some > > tips before I start on this? > > > > Kind regards, > > > > Dirk > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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

