首页 > 移动平台 > 详细

python for android : 读通讯录

时间:2014-03-03 11:43:25      阅读:597      评论:0      收藏:0      [点我收藏+]

参考:  \sl4a\doc\ContactsFacade.html

读通讯录: id,姓名,电话号码

contacts.py

import android
import os,sys
reload(sys)
sys.setdefaultencoding(‘utf-8‘)

droid = android.Android()
ids = droid.contactsGetIds().result
for i in ids:
    uri = ‘content://contacts/people/‘+str(i)+‘/phones‘
    res = droid.queryContent(uri).result[0]
    #print res
    print str(i),res[‘name‘],res[‘number‘]



python for android : 读通讯录,布布扣,bubuko.com

python for android : 读通讯录

原文:http://blog.csdn.net/belldeep/article/details/20287325

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!