Connect to android contacts menu

I want a menu item to be displayed when a user views a contact in an Android app. I thought you need to define an intent filter and it will appear, but it does not work, as I thought it would be

This is my filter intent:

<activity android:name="com.myapp.intents.Contact" android:label="@string/actContactsMenu"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.EDIT" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="vnd.android.cursor.item/person" android:host="contacts" /> <data android:mimeType="vnd.android.cursor.item/contact" android:host="com.android.contacts" /> <data android:mimeType="vnd.android.cursor.item/raw_contact" android:host="com.android.contacts" /> </intent-filter> </activity> 

When the above menu is not displayed, when I look at a contact, but when I click on a contact in the list, I get a pop-up window with the name of my activity, and when I select it, my activity appears. The same thing happens when I try to edit a contact.

This is not what I want. I want the menu to appear when viewing a contact and editing a contact. Intent filters are not a way to do this?

Thanks for any help.

+4
source share
1 answer

After searching the google Android group it seems like this is not possible. For some reason, the contacts application does not currently call the addIntenOptions method, which Android uses to find any actions that may be performed on the current data. Not sure if I should answer my question, but I believe that this can help someone who is trying to do the same.

0
source

All Articles