This may be a very specific question so I'm asking here. Also, I read this question but this does not apply in my case.
Shortly, I'm trying to join two content://
tables and then I should pass the result to a CursorLoader
.
I've tried to write a rough selection clause as
Uri frequent_contact = ContactsContract.Contacts.CONTENT_STREQUENT_URI;
Uri all_contacts = ContactsContract.Contacts.CONTENT_URI;
String selection = "'" + frequent_contact + "._id' = '" + all_contacts + "._id'";
or
String selection = frequent_contact + "._id = " + all_contacts + "._id";
Because the _id value is an int but it is saved as a String.
Then I return new CursorLoader(context, all_contacts, null, selection, null, null);
In the first case the app runs but the adapter is not filled, in the second case the app crash.
So, is it possible to join two content://
table? And if yes, how?
Thank you in advance.