如何通过contacts api获取同步的twitter原始联系人?

发布于 2024-10-08 06:37:55 字数 226 浏览 0 评论 0原文

我有一个来自同步联系人的用户 ID,我现在尝试检索来自官方 Twitter 客户端的同步适配器创建的原始 Twitter 帐户。 如何指定 Twitter 帐户过滤所需的 MIME 类型?

MIME类型列的内容是:

列名称是:mimetype 内容是: vnd.android.cursor.item/vnd.twitter.profile

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 content of the MIME Type Column is:

Column Name is: mimetype Content is:
vnd.android.cursor.item/vnd.twitter.profile

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北方的巷 2024-10-15 06:37:55

我的不好。另一个错误使我想要的结果对我来说是不可见的。

以下代码为您提供同步的 Twitter 联系人:

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

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);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文