这很奇怪。我在某些设备上看到了这个崩溃报告:
android.content.ActivityNotFoundException:
No Activity found to handle Intent {
act=android.intent.action.PICK dat=content://com.android.contacts/contacts }
产生这个错误的 Intent 是:
Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI); // pre-Eclair
或者:
Intent intent = new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI); // post-Eclair
该设备被简单地报告为“Droid”,但我不知道操作系统版本。
最佳答案
要获取联系人,我使用以下代码:
Intent intent = new Intent ( Intent.ACTION_GET_CONTENT );
intent.setType ( ContactsContract.Contacts.CONTENT_ITEM_TYPE );
startActivityForResult ( intent, 1 );
关于android - ActivityNotFoundException 试图加载联系人 ContentProvider?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3701966/