HELP! Cannot launch sub activity

by Jennifer » Fri, 23 Apr 2010 08:05:47 GMT


Sponsored Links
 Hi y'all,

I'm working on making an application that requires me to populate a
contact list.

My code works when the intent-filter for the activity is set to:

<activity android:name=".ContactPicker"
                  android:label="Contact Picker">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
</activity>

However, I do not want this activity to start right at the launch of
the emulator. My program has a menu page where once you click on a
button, this contact picker (basically a contact list) will show up.
What are the manifest attributes that I need for this to happen?

Thanks!

Jennifer

--



HELP! Cannot launch sub activity

by Kumar Bibek » Fri, 23 Apr 2010 12:43:35 GMT


 Then you should have another activity with the same intent filter.
Remove the intent filter from this Activity.

And from the other activity, on button click event you need to start
this Activity.

<activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
</activity>
<activity android:name=".ContactPicker"
                  android:label="Contact Picker"/>

Thanks and Regards,
Kumar Bibek



>


Sponsored Links