我想从我自己的 Android 应用程序中打开联系人。
如果我做 :
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(ContactsContract.Contacts.CONTENT_URI);
我可以打开联系人,显示“人员”选项卡。我怎样才能实现类似的目标,但改为显示“组”选项卡?更改为ContactsContract.Contacts.CONTENT_GROUP_URI
或ContactsContract.Groups.CONTENT_URI
不起作用。单击后,它将在控制台中弹出“无法完成操作”和以下消息:
01-14 17:21:36.525: W/ContentResolver(26851): Failed to get type for:
content://com.android.contacts/contacts/group/0 (
URI: content://com.android.contacts/contacts/group/0,
calling user: android.uid.system:1000,
calling package is one of: [
com.motorola.usbcamera,
com.motorola.android.deepsleepservice,
com.android.keychain,
com.motorola.blur.setup,
com.android.settings,
com.motorola.atcmd,
com.android.portal,
com.android.vpndialogs,
com.motorola.meter.omap,
com.motorola.dockcomm,
com.motorola.blur.setupsettings,
com.android.providers.settings,
com.motorola.Upgrader,
com.motorola.devicestatistics,
com.motorola.android.eapauthservice,
com.motorola.android.fota,
android,
com.motorola.android.providers.settings,
com.motorola.atcmdlauncher,
com.google.android.backup,
com.motorola.globalunplug,
com.motorola.android.encryption.settings,
com.motorola.blur.provider.datacollector,
com.motorola.datacollection,
com.motorola.dataswitch,
com.android.systemui,
com.motorola.contextual.fw,
com.motorola.vpn,
com.motorola.android.extdispservice,
com.motorola.android.dlnasystemservice
]
)
编辑 或者是否可以在开始与“人员”选项卡联系后以编程方式切换到“组”选项卡?
任何建议将不胜感激。