public void showContactPicker(int requestCode) { requestCode |= REQUEST_MASK_RECIPIENT_PRESENTER; isInSubActivity = true; startActivityForResult(contacts.contactPickerIntent(), requestCode); }
/** * Does the device actually have a Contacts application suitable for * picking a contact. As hard as it is to believe, some vendors ship * without it. * * @return True, if the device supports picking contacts. False, otherwise. */ private boolean hasContactPicker() { if (hasContactPicker == null) { Contacts contacts = Contacts.getInstance(context); PackageManager packageManager = context.getPackageManager(); List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(contacts.contactPickerIntent(), 0); hasContactPicker = !resolveInfoList.isEmpty(); } return hasContactPicker; }