是否可以在不使用 Activity 类的情况下检索联系人?

发布于 2024-10-04 23:22:03 字数 228 浏览 0 评论 0原文

是否可以在不使用 Activity 类的情况下检索联系人?

我正在使用 LWUIT 来开发 Android 应用程序。我需要从 Android 电话簿中检索联系人。怎么可能呢?

因为通常检索联系人过程是在扩展 Activity 类内部实现的。 (我看过一些例子)。

在LWUIT中,他们创建了自己的Activity类。 所以我需要完成一些不在活动课中的其他课程。

怎么可能呢?

Is it possible to retrieve the contacts without using Activity class?

I'm using LWUIT for developing android application. I need to retrieve the contacts from android phonebook. How its possible?

Because normally retrieve contacts process achieved in inside of extend Activity class. ( I seen some examples).

In LWUIT, They created own Activity class.
So i need to achieve some other class not in activity class.

How its possible?

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

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

发布评论

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

评论(1

聽兲甴掵 2024-10-11 23:22:03

联系人可从 android.provider.Contacts(Android 1.6 及更早版本)和 android.provider.ContactsContract(Android 2.0 及更高版本)内容提供程序获取。您不需要使用 ContentResolver 查询这些内容提供程序的活动。

Contacts are available from the android.provider.Contacts (Android 1.6 and earlier) and android.provider.ContactsContract (Android 2.0 and newer) content providers. You do not need an activity to query those content providers using a ContentResolver.

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