首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

判断联系人Contacts的版本有关问题

2012-09-29 
判断联系人Contacts的版本问题Intent intent null ? ? ? ? ? ? ? ? ? ? ? ? ClassLoader classLoader

判断联系人Contacts的版本问题

Intent intent = null;
? ? ? ? ? ? ? ? ? ? ? ? ClassLoader classLoader = DialerContactList.class.getClassLoader();
? ? ? ? ? ? ? ? ? ? ? ? try
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? classLoader.loadClass("android.provider.ContactsContract");
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intent = new Intent(Intent.ACTION_PICK,Uri.parse("content://
com.android.contacts/data/phones"));
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? catch (ClassNotFoundException e)
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? if (intent == null)
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? intent = new Intent(Intent.ACTION_PICK,Phones.CONTENT_URI);
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? startActivityForResult(intent, ADD_CONTACT);

热点排行