<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    小菜毛毛技術分享

    與大家共同成長

      BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
      164 Posts :: 141 Stories :: 94 Comments :: 0 Trackbacks
    1. String[] projection = new String[] {  
    2. People._ID,  
    3. People.NAME,  
    4. People.NUMBER,  
    5. };  
    6.   
    7. // Get the base URI for People table in Contacts content provider.  
    8. // which is: content://contacts/people/  
    9. Uri contactUri = People.CONTENT_URI;  
    10.   
    11. // Best way to retrieve a query; returns a managed query.  
    12. Cursor peopleCursor = managedQuery (contactUri,  
    13. projection, //Which columns to return.  
    14. null, // WHERE clause--we won't specify.  
    15. null, // Selection Args??  
    16. People.DEFAULT_SORT_ORDER); // Order-by name  
    17.   
    18. // go to the beginning of the list  
    19. peopleCursor.moveToFirst();  
    20.   
    21.   
    22. // So, here we have a contact. We need to get the contact ID (_id) then  
    23. // build the Uri to get the phones section of that user's record  
    24. // which is a subdirectory of a contact record  
    25.   
    26. long personId = peopleCursor.getLong(peopleCursor.getColumnIndex("_id"));  
    27.   
    28. Uri personUri = ContentUris.withAppendedId(contactUri, personId );  
    29.   
    30. // So now the URL looks like: content://contacts/people/_id(where the actual id of the record is here)  
    31. Uri phoneUri=  
    32. Uri.withAppendedPath(personUri, Contacts.People.Phones.CONTENT_DIRECTORY);  
    33.   
    34. // Now the URL looks like: content://contacts/people/_id/phones (where phones is literally "phones")  
    35.   
    36. // Now get all the phone numbers for this contact  
    37. Cursor phonesCursor = managedQuery(phoneUri,  
    38. null,  
    39. null,  
    40. null,  
    41. Phones.DEFAULT_SORT_ORDER);  
    42.   
    43. // We now have a cursor for all the phone numbers for that User ID  
    44. // go to the beginning of the phone list.  
    45. phonesCursor.moveToFirst();   
    posted on 2010-12-17 17:45 小菜毛毛 閱讀(1050) 評論(0)  編輯  收藏 所屬分類: andriod
    主站蜘蛛池模板: 日本免费观看网站| 午夜亚洲www湿好大| 中国一级毛片免费看视频| 亚洲国产精品无码成人片久久| 中文字幕在线免费观看| 亚洲a∨无码一区二区| 久久亚洲国产午夜精品理论片| 亚洲人成网站免费播放| 国产日韩AV免费无码一区二区三区 | 亚洲宅男精品一区在线观看| 亚洲av中文无码| 日本免费一区二区在线观看| 国产亚洲情侣久久精品| 亚洲视频在线观看不卡| 亚洲黄黄黄网站在线观看| 最近高清中文字幕无吗免费看| 伊人久久国产免费观看视频| 亚洲国产日韩在线成人蜜芽 | 一个人看的www免费高清| 亚洲酒色1314狠狠做| 亚洲 综合 国产 欧洲 丝袜 | 日韩免费电影在线观看| 一级毛片成人免费看免费不卡| 香蕉视频亚洲一级| 亚洲一区二区三区高清视频| 国产亚洲美女精品久久久| 四虎成人免费大片在线| 69av免费观看| 国产偷伦视频免费观看| 边摸边脱吃奶边高潮视频免费| 亚洲国产情侣一区二区三区| 亚洲乱码中文字幕综合| 免费一级毛片正在播放| 无码人妻一区二区三区免费手机| 久久精品视频免费看| 男女拍拍拍免费视频网站| 美女被爆羞羞网站免费| 亚洲中文无码mv| 亚洲香蕉久久一区二区| 亚洲国产成人九九综合| 久久精品国产亚洲av高清漫画|