Thanks Dianne. For explanation.

I changed the action name to "android.intent.action.GET_RESULT"

Now it displays me an option to choose which app to execute.

Thanks,
- mani

On Sep 8, 12:23 am, Dianne Hackborn <[email protected]> wrote:
> - You don't need multiple apps to test this.  Just more than two activities,
> in any apps, matching the launched intent.
> - You this behavior in various places in the base system (for example
> clicking on a map link in the browser).
> - The standard chooser dialog (such as what is brought up when you select a
> "share" menu) is actually a form of this.
> - To see an example, just install a home screen replacer app.  When you
> press home, an implicit intent to launch the home app is started, and at
> that point you will go into the intent resolver to select which home app you
> want.
> - Use Intent.FLAG_DEBUG_LOG_RESOLUTION to see debug information printed in
> the log while your intent is being resolved.
>
>
>
>
>
> On Tue, Sep 7, 2010 at 8:37 AM, mani <[email protected]> wrote:
> > Hi all,
>
> >  I am sorry that i may ask known questions to you all. But i couldnt
> > figure out the exact understanding of implicit intents.
>
> > When i was going through the tutorial i read about it.
>
> > here are some important points to remember:
> > 1 - Implicit Intents do not specify a target component
> > 2 - Components willing to receive implicit intents have to declare
> > their ability to handle a specific intent by declaring intent filters
> > 3 - A component can declare any number of Intent Filters
> > 4 - There can be more than one component that declares the same Intent
> > Filters and hence can respond to the same implicit intent. In that
> > case the user is presented both the component options and he can
> > choose which one he wants to continue with
> > 5- You can set priorities for the intent filters to ensure the order
> > of responses.
>
> > I read this about Implicit Intents.
>
> > I couldnt get visualisation of 4th point. So wanted to try it out by
> > writing some examples.
>
> > I tested this like below.
> > Wrote two apps.
>
> > I had written two activities in one app, CallingActivity &
> > anotherActivity.
>
> > <manifest xmlns:android="http://schemas.android.com/apk/res/android";
> >    package="com.android.localguide">
> >    <application>
> >        <activity class=".CallingActivity"
> > android:label="callingactivity">
> >            <intent-filter>
> >                <action android:value="android.intent.action.MAIN" />
> >                <category
> > android:value="android.intent.category.LAUNCHER" />
> >            </intent-filter>
> >      </activity>
> >       <activity class=".anotherActivity"
> > android:label="anotheractivity">
> >            <intent-filter>
> >                <action
> > android:value="com.android.localguide.GET_RESULT" />
> >                <category
> > android:value="android.intent.category.DEFAULT" />
> >            </intent-filter>
> >      </activity>
>
> >    </application>
> > </manifest>
>
> > One more app,which has two activities like below.
>
> > <?xml version="1.0" encoding="utf-8"?>
> > <manifest xmlns:android="http://schemas.android.com/apk/res/android";
> >      package="com.android.test"
> >      android:versionCode="1"
> >      android:versionName="1.0">
> >    <application android:icon="@drawable/icon" android:label="@string/
> > app_name">
> >        <activity android:name=".testmain"
> >                  android:label="@string/app_name">
> >            <intent-filter>
> >                <action android:name="android.intent.action.MAIN" />
> >                <category
> > android:name="android.intent.category.LAUNCHER" />
> >            </intent-filter>
> >        </activity>
> > <activity android:name=".results">
> >        <intent-filter>
> >                <action android:name="com.android.localguide.GET_RESULT"/>
> >                <category android:name="android.intent.category.DEFAULT"/>
> >        </intent-filter>
> >        </activity>
> >    </application>
>
> > </manifest>
>
> > I ran the first app in emulator and pressed home screen, it mean it
> > runs in the background.(Not exited )
> > Then i opened the second app and clicked a button in frirst
> > activity(testmain)  and tried to call setAction
> > "com.android.localguide.GET_RESULT"
>
> > i.setAction("com.android.localguide.GET_RESULT");
>
> > But it is opening the activity "results".. It dint showed a options to
> > choose which components( i expected first app ) activity i need to
> > use ?
>
> > Am i right in executing in the right context to understand that point
> > no 4 ?
>
> > Could anyone please elloborate on that point ?
>
> > thanks,
> > Mani
>
> > --
> > 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%2Bunsubs 
> > [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

Reply via email to