开发者

How to obtain the synced twitter raw contact through the contacts api?

开发者 https://www.devze.com 2023-01-31 15:55 出处:网络
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.

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消