开发者

How to compare phone numbers?

As PhoneNumberUtils is deprecated, How can we two phone numbers if they're identical enough for caller ID purposes. I mean different formats +44xxxxxxxxxx, 0xxxxxxxxxx开发者_StackOverflow社区


Use the PhoneNumberUtils.compare function doc: http://developer.android.com/reference/android/telephony/PhoneNumberUtils.html


reverse strings and compare only first 10 characters?


The best way would be for you to create a regular expression that would parse the actual phone number xxx-xxxx from any of it's prefixes (+xx, xxx).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜