我想从主屏幕小部件中显示快速联系徽章,该小工具在网格布局中显示最喜欢的联系人图片。我通过提示here,但我仍然无法弄清楚。从主屏幕小部件打开QuickContactBadge Android 4+
当我点击一个联系人,我总是得到以下错误:
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
尽管我打电话了 'ContactsContract.QuickContact.showQuickContact();'来自一项活动。
这个意图是造成问题:com.android.contacts.action.QUICK_CONTACT
我试图将其添加到我的清单文件中没有成功:
<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>
什么建议吗?因为我展示的集合,我用RemoteViewsService
模式描述here
感谢