Android 具有多个uri的查询';s

Android 具有多个uri的查询';s,android,cursor,uri,contactscontract,Android,Cursor,Uri,Contactscontract,这很有效。我可以在给定数字1的光标中得到我需要的东西 我想要的是查询多个数字,并在同一个游标中获得所有结果 例如: Uri contactUri1 = Uri.withAppendedPath( ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number1)); Cursor phones = getContentResolver() .query(contactUri1, PEOPLE_PROJECTIO

这很有效。我可以在给定数字1的光标中得到我需要的东西

我想要的是查询多个数字,并在同一个游标中获得所有结果

例如:

Uri contactUri1 = Uri.withAppendedPath(
    ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number1));
Cursor phones = getContentResolver()
    .query(contactUri1, PEOPLE_PROJECTION, null, null, null);

这可能吗?

您是否查看了MergeCursor-?假设可以。谢谢。你看过MergeCursor-?假设可以。谢谢
Uri contactUri1 = ...
Uri contactUri2 = ...
Cursor phones = getContentResolver().query(...  //Both URI's