开发者

how to get only contact numbers without using android widgets?

开发者 https://www.devze.com 2023-03-09 03:32 出处:网络
hi all below code giving me contact names and phone numbers from contact listbut i need only phone numbers howcan i solve the issue so give me solution 开发者_JAVA百科with full detailswithout using an

hi all below code giving me contact names and phone numbers from contact list but i need only phone numbers how can i solve the issue so give me solution 开发者_JAVA百科with full details without using android widget

public void getContacts(Context context){
    context.startActivity(new Intent(Intent.ACTION_PICK, People.CONTENT_URI));      
}


You can use the contactscontract api for that. For a reference on that api you can refer to http://developer.android.com/reference/android/provider/ContactsContract.html]1

For an example on how to use this api you can look at this example at google code http://code.google.com/p/android-contacts-contract-example/

0

精彩评论

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