I am trying to show the Quick Contact Badge from a home screen widget which shows the favourite contact pictures in a grid layout. I went through the tips here but still I cannot figure it out.
When I click on a contact I always get the following error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.gridwidget/com.example.gridwidget.ContactBadge}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.contacts.action.QUICK_CONTACT
despite I am calling the ‘ContactsContract.QuickContact.showQuickContact();’ from an activity.
This intent is causing the problem: com.android.contacts.action.QUICK_CONTACT
I tried to add it in my manifest file without success:
<activity
android:name="com.example.gridwidget.ContactBadge"
android:label="@string/title_activity_contact_badge"
android:theme="@android:style/Theme.NoDisplay" >
<intent-filter>
<action android:name="com.android.contacts.action.QUICK_CONTACT" />
<action android:name="com.example.gridwidget.BADGE_ACTION" />
</intent-filter>
</activity>
Any suggestion? Since I am showing a collection, I used the RemoteViewsService pattern as described here
Thanks
I found the problem. The URI I was passing to
ContactsContract.QuickContact.showQuickContact()was badly formatted.It is working properly now