If you want to compare phone numbers, you can always use
PhoneNumberUtils.compare(number1, number2);
or
PhoneNumberUtils.compare(context, number1, number2);
Then you donβt need to worry about the country code, it will simply compare the numbers with the reverse order and see if they match (enough for callerID purposes, at least).
Tomas
source share