是否可以在不使用 Activity 类的情况下检索联系人?
是否可以在不使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
联系人可从
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) andandroid.provider.ContactsContract
(Android 2.0 and newer) content providers. You do not need an activity to query those content providers using aContentResolver
.