Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compare phone numbers?

Tags:

android

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

like image 798
Shri Avatar asked Dec 28 '22 21:12

Shri


2 Answers

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

like image 157
hussainkothari Avatar answered Dec 30 '22 11:12

hussainkothari


reverse strings and compare only first 10 characters?

like image 24
Ian Avatar answered Dec 30 '22 10:12

Ian