0

I want to show the user a flattened pick list of all their contacts phone numbers and it must work from versions 1.6 up. I have read the related questions on SO and the Android documentation for Eclair.

The problem is, even splitting my code into a factory class and specific implementations does not work for me because using Contacts.CONTENT_URI only shows contacts not individual numbers. What I need is this for version 1.6

Intent intent = new Intent(Intent.ACTION_PICK, Phones.CONTENT_URI);
startActivityForResult(intent, REQUEST_PICK_CONTACT);

And the equivalent for 2.0 and above.

Even if I get their example to work, by building against the 2.1 API am I not stopping my app being visible on the Market to users with earlier versions of the OS? I can't launch it against a 1.6 emulator, for example.

4

1 回答 1

0

根据文档联系人类已被贬值,您必须使用ContactsContract类来阅读联系人。一个完美的例子可以在How to read contacts on Android 2.0中找到

于 2010-06-02T04:28:26.300 回答