I am guessing from the lack of response, either nobody is interested
or nobody really knows.  Well, I made some progress on figuring out
this seemingly undocumented feature.

Here are some of the findings/relevant links to the relevant
information:

When creating RawContacts, the Sync Service provides a <meta-data>
file that contains ContactsDataKind information.  Each
ContactsDataKind must have a mimetype associated with it.

See:
http://developer.android.com/resources/samples/SampleSyncAdapter/AndroidManifest.html
http://developer.android.com/resources/samples/SampleSyncAdapter/res/xml/contacts.html

Note in the above contacts.xml metadata file, the use of the mimetype:
android:mimeType="vnd.android.cursor.item/
vnd.samplesyncadapter.profile"

This should make the ContactsDataKind show up in the ContactDetails
screen.  Now for integrating with the Quick Contacts menu, it is
necessary to define an Activity in the AndroidManifest.xml that has
the mimetype above in the data section:

<activity>
        android:name=".MyActivityName"
        android:icon="@drawable/sampleicon"
        <intent-filter>
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <data android:mimeType="vnd.android.cursor.item/
vnd.samplesyncadapter.profile"/>
        </intent-filter>
</activity>



This is how far I have gotten so far.  Will update more if there is
interest in this thread.

On Sep 19, 6:55 pm, Nik Bhattacharya <[email protected]>
wrote:
> Bump.
>
> Can anyone help on this subject?  How do I integrate with the quick
> contacts menu?
>
> On Sep 9, 10:39 am, Nik Bhattacharya <[email protected]>
> wrote:
>
>
>
> > I would like to add an quick contact option to the Quick Contact
> > window that displays for a contact.  How do I get this option to show
> > up when the user taps on a contact?  I looked at the Facebook and
> > Twitter applications and can see that they have this:
>
> > Facebook:
>
> > <activity name=".ProfileTabHostActivity>
> >         <intent-filter>
> >                 <action name="android.intent.action.VIEW"/>
> >                 <category name="android.intent.catefory.DEFAULT"/>
> >                 <data 
> > mimeType="vnd.android.cursor.item/vnd.facebook.profile"
> > host="com.android.contacts"/>
> >         </intent-filter>
> > </activity>
>
> > Twitter:
>
> > <activity name=".ProfileTabActivity>
> >         <intent-filter>
> >                 <action name="android.intent.action.VIEW"/>
> >                 <category name="android.intent.catefory.DEFAULT"/>
> >                 <data mimeType="vnd.android.cursor.item/vnd.twitter.profile"
> > host="com.android.contacts"/>
> >         </intent-filter>
> > </activity>
>
> > First of all, I am not sure that the snippets above are *really* what
> > get used to plug into the quick contacts.  It's just an educated
> > guess.  I still am at a bit of a loss to figure out exactly how to
> > plug into the quick contact window (for example, which xml/java file
> > did Facebook/Twitter apps use to declare their intent to plug into the
> > quick contact window, declare the icon to show etc?).
>
> > I am not specifically interested in Facebook/Twitter, its just that
> > these apps have plugged into the new API successfully.  I am just
> > looking for an end to end example (ideally) or simply pointers to how
> > to integrate my contacts sync info into the quick contacts menu.
>
> > Any help is much appreciated.

-- 
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