我的家園

          我的家園

          Android Contacts(一)—— 讀取聯系人

          Posted on 2012-04-15 16:37 zljpp 閱讀(273) 評論(0)  編輯  收藏

          Introduction To Android Contacts

          Learn to work with the Android contacts database. Basic knowledge of accessing SQLite in Android along with using Cursors is expected. See the Android SQLite and Cursor Article for more information. Google changed the contacts database moving from 1.x to 2.0 versions of Android. This tutorial will be broken into 3 sections. First covering accessing contacts in Android 2.0. The second page will deal with accessing the contacts in Android 1.6 and before. Third we'll glue it all together with a class that abstracts specific classes for each version and a set of classes to manage the data from the contact records.


          Contacts 讀取代碼:

          AndroidManifest.xml 權限

           記得在AndroidManifest.xml中加入android.permission.READ_CONTACTS這個permission

          <uses-permission android:name="android.permission.READ_CONTACTS" />


          運行結果:



          代碼示例


          參考推薦:

          Working With Android Contacts

          Android Contacts的使用 



          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 尚志市| 阿克| 岑溪市| 榕江县| 上林县| 博爱县| 深水埗区| 洪雅县| 长葛市| 青河县| 玉屏| 绥滨县| 阆中市| 鄯善县| 九江县| 乐山市| 宜章县| 漯河市| 南康市| 安泽县| 海林市| 仙游县| 体育| 托克逊县| 浦县| 新安县| 永清县| 水富县| 鞍山市| 甘肃省| 兰考县| 通州区| 进贤县| 万宁市| 禄劝| 乌拉特后旗| 博爱县| 阆中市| 成都市| 合阳县| 赞皇县|