Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/228.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何根据帐户类型筛选联系人选取者意图_Android_Android Intent_Android Contacts - Fatal编程技术网

Android 如何根据帐户类型筛选联系人选取者意图

Android 如何根据帐户类型筛选联系人选取者意图,android,android-intent,android-contacts,Android,Android Intent,Android Contacts,在应用选取器(隐式)意图时,我们可以显示联系人列表,其中包含手机中的所有联系人。为此,我们通常使用以下代码: Intent contactPickerIntent = new Intent(Intent.ACTION_PICK, ContactsContract.CommonDataKinds.Phone.CONTENT_URI); startActivityForResult(contactPickerIntent, RESULT_PICK_CO

在应用选取器(隐式)意图时,我们可以显示联系人列表,其中包含手机中的所有联系人。为此,我们通常使用以下代码:

Intent contactPickerIntent = new Intent(Intent.ACTION_PICK,
                ContactsContract.CommonDataKinds.Phone.CONTENT_URI);
        startActivityForResult(contactPickerIntent, RESULT_PICK_CONTACT);
但应如何根据帐户类型筛选列表中显示的联系人。 例如,如果我只想显示在whatsapp注册的联系人。在这种情况下,应如何在联系人列表中仅显示whats app注册的联系人

注意:可以通过查询数据库来检索特定帐户类型的联系人,但在这种情况下,我们需要创建自己的联系人列表来显示过滤后的联系人。目的是使用联系人应用程序列表显示过滤后的联系人