0

I am creating an app that allows users to find friends via address book contacts. Users have to enter their own phone number(including area code) when they sign up. Given an user A, I currently compare phone numbers in the database(phone numbers gathered from sign up) with user A's address book contacts. However, I noticed that some contacts on my phone do not have area codes. Is there a way to ascertain whether two numbers are the same when no area code is available?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • You may be able to assume that numbers with no area code are in the same area code as the user. – rmaddy May 14 '14 at 18:47

1 Answers1

-2

I would suggest storing the area code and number separately. This way, you would be able to compare non area coded phone numbers with some degree of confidence, as opposed to just checking against the last 7 digits of a 10+ digit phone number.