V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
chenhui7373
V2EX  ›  Android

国外手机安卓获取通讯录联系人手机号码

  •  
  •   chenhui7373 · 2016-01-23 11:29:49 +08:00 · 4469 次点击
    这是一个创建于 3029 天前的主题,其中的信息可能已经有所发展或是发生改变。

    还能是这种姿势吗?这样获取到号码是不是都会加上国际区号还有长途号阿?(没有条件测试,只好来问了。)

    Cursor cursor = context.getContentResolver().query(Phone.CONTENT_URI, null, null, null, null);
    String phoneNumber;
    while (cursor.moveToNext()) {
    phoneNumber = cursor.getString(cursor.getColumnIndex(Phone.NUMBER));
    mPhoneNumbers.add(phoneNumber);
    }

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3031 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 15:04 · PVG 23:04 · LAX 08:04 · JFK 11:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.