如何检索来电号码的联系人姓名? [英] How to retrieve the contact name from incoming call number?

查看:318
本文介绍了如何检索来电号码的联系人姓名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从来电号码检索联系人姓名?

How to retrieve the contact name from incoming call number?

推荐答案

再次编辑我的答案,因为最后提到的链接不工作好。 首先,你需要让你可以与bbelow引用链接<一个帮助管理进来的主叫号码href="http://stackoverflow.com/questions/1853220/retrieve-incoming-calls-phone-number-in-android">Retrieve在Android的来电的电话号码

Editing my answer again because last mentioned link was not working good. First you need to get the incomming caller number which you can manage with the help of bbelow reference link Retrieve incoming call's phone number in Android

所以,一旦你有多少,你可以用下面的code,以获得联系人姓名\

So once you have the number, you can use the below code to get the contact name\

Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber));
resolver.query(uri, new String[]{PhoneLookup.DISPLAY_NAME} .....)

这篇关于如何检索来电号码的联系人姓名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆