編輯:關於android開發
// 通過隱式意圖打開通訊錄
Intent intent =newIntent(Intent.ACTION_PICK,ContactsContract.Contacts.CONTENT_URI);
startActivityForResult(intent,1001);
// 獲取選擇後的返回結果
@Override
protectedvoid onActivityResult(int requestCode,int resultCode,Intent data){
super.onActivityResult(requestCode, resultCode, data);
if(requestCode ==1001){
if(resultCode == RESULT_OK){
ContentResolver resolver = getContentResolver();
Uri uri = data.getData();
//uri = content://com.android.contacts/contacts/lookup/0r5-D9ADC7B9BBC9C7B9DBBDADC9/5
Cursor cursor = resolver.query(uri,null,null,null,
null);
if(cursor.moveToFirst()){
for(int i =0; i < cursor.getColumnCount(); i++){
Log.i("-->", cursor.getColumnNames()[i]+":"+ cursor.getString(i));
}
sort_key:wang hongxiao
photo_uri:null
send_to_voicemail:0
contact_status:null
contact_status_label:null
pinned:0
display_name:wang hongxiao
phonebook_label_alt:H
phonebook_bucket:23
contact_status_res_package:null
in_default_directory:1
photo_id:null
custom_ringtone:null
_id:5
times_contacted:0
phonebook_label:W
display_name_alt:hongxiao, wang
lookup:0r5-D9ADC7B9BBC9C7B9DBBDADC9
phonetic_name:null
last_time_contacted:0
contact_last_updated_timestamp:1477791122100
has_phone_number:1
in_visible_group:1
display_name_source:40
photo_file_id:null
is_user_profile:0
contact_status_ts:null
sort_key_alt:hongxiao, wang
phonebook_bucket_alt:8
contact_presence:null
starred:0
photo_thumb_uri:null
contact_status_icon:null
contact_chat_capability:null
phonetic_name_style:0
name_raw_contact_id:5
android fragment生命周期應用 問題描述 很多時候我們使用fragment都是在viewpager裡面嵌套fragment,或者activity下面一
Android 扒開美女衣服,android扒開美女本文主要實現一個小的扒開美女衣服的游戲項目 效果如下: 項目布局設計: <FrameLayout xmlns
AndroidStudio怎樣導入jar包,androidstudiojarAndroidStudio用於開發安卓Apk非常地方便,但是它的很多設置都與Eclipse不一
Android中的LinearLayout布局,linearlayout垂直布局LinearLayout : 線性布局