I need to compare two phone numbers to determine if they are from the same sender / receiver. The user can send a message to the contact, and this contact can reply.
The answer usually comes +[country-code][area-code-if-any][and-then-the-actual-number] . For example, +94 71 2593276 for the phone number of Sri Lanka.
And when the user sends a message, he usually enters in the format (for the example above) 0712593276 (suppose he is also in Sri Lanka).
So what I need, I need to check if these two numbers match. This app will be used internationally. Therefore, I canβt just replace the first 2 digits with 0 (then this will be a problem for countries like the USA). Is there any way to do this in Java or Android?
Thanks.
Roshnal
source share