I have a user id from a synced contact, I now try to retrieve the raw twitter accounts that the sync adapter from the official twitter client creates. How would I specify the MIME Type for needed to filter for the Twitter Account?
The conte开发者_运维百科nt of the MIME Type Column is:
Column Name is: mimetype Content is: vnd.android.cursor.item/vnd.twitter.profile
My bad. Another Error made the result I wanted to get invisible to me.
The following code gives you the synced twitter contact:
Cursor rawTwitterContact = getContentResolver().query(Data.CONTENT_URI, null, Data.CONTACT_ID + "=? AND " + Data.MIMETYPE + "='vnd.android.cursor.item/vnd.twitter.profile'", new String[] { String.valueOf(userId) }, null);
精彩评论