Questions tagged [libphonenumber]

Google's common Java, C++ and Javascript library for parsing, formatting, storing and validating international phone numbers. The Java version is optimized for running on smartphones, and is used by the Android framework since 4.0 (Ice Cream Sandwich).

libphonenumber is a library for handling phone numbers. It can parse and format phone numbers as well as provide geographical information about phone numbers.

libphonenumber is written by Google engineers and is used in Android and other Google projects.

230 questions
5
votes
1 answer

libphonenumber on iOS usage example

I'm trying to use libphonenumber on iOS. I'm using Matt Connolly's libphonenumber-ios from GitHub and I've build boost framework and it's all fine. Now I can't figure out how to actually use it after I drag libphonenumber.a inside my Xcode project!…
Hesham
  • 5,294
  • 3
  • 34
  • 48
4
votes
1 answer

libphonenumber: goog is not defined

I am trying to use Google's libphonenumber library in my project. I am trying to validate a phone number input using the javascript version, but it is giving me a "goog is not defined" error. I am very new to javascript andI have already spent a day…
Khizar
  • 2,288
  • 5
  • 32
  • 53
4
votes
3 answers

How do I remove the international option in React Phone Number Input?

How do I remove the international option from the select options in react-phone-number-input package? I am trying to limit the countries to only six. I have added the defaultCountry and countries prop but it still allows for other countries' phone…
Idris
  • 558
  • 7
  • 29
4
votes
1 answer

How to add leading zero to national number?

I'm using predefined Phone Formats to format a national phone number but returned the national significant number. not prefixed with 0. for example: US Phone# PhoneNumber = +16175551212 (national number is 6175551212) pf = new PhoneFormat("(XXX)…
roeygol
  • 4,908
  • 9
  • 51
  • 88
4
votes
1 answer

Spring (instantiation of Google Lib phone number) using a Filter to change a Model instance variable

I'm currently trying to modify, (via a Spring filter) some of the request variables being posted into a form. Reason being, I would like to implement better phone number validation, and better control how telephone numbers are formatted. For that…
Squiggs.
  • 4,299
  • 6
  • 49
  • 89
4
votes
1 answer

formatting phone numbers using libPhoneNumber

I am using libPhone library in angular js application to validate if the phone numbers are valid. However I have to show the valid format that the user has to provide in case the phone number entered is invalid. The user will provide the country…
dream123
  • 129
  • 3
  • 14
4
votes
2 answers

What is the best way to set up libphonenumber(PHP) manually without Composer?

Due to some constraints, I'm unable to install libphonenumber via composer, so I've manually added it to my project's lib directory. I'm getting the following error when I try to use it via manual setup: PHP Fatal error: Class…
kassold
  • 469
  • 3
  • 8
  • 21
4
votes
0 answers

Phone number validation and formatting on iOS

I am using this library https://github.com/me2day/libPhoneNumber-iOS for validating the phone numbers. I want to ask is that on whatsapp If you enter a phone number digits greater or less than the original Phone number of some country it shows…
user1hjgjhgjhggjhg
  • 1,237
  • 4
  • 15
  • 34
4
votes
3 answers

iOS Convert phone number to international format

In my iOS app I have to convert a phone number (taken in the contacts) and convert it in international format (to send SMS automatically with an extern library). I saw libPhoneNumber but the problem is that we have to enter the country code, and the…
Karz
  • 557
  • 1
  • 6
  • 22
4
votes
4 answers

Using PhoneNumberFormattingTextWatcher without typing country calling code

In the login panel of my app, I divided the country calling code and the remaining numbers in two editable TextView as below: I want to use international formatting standard in the TextView on the right. If a user who has a phone number as…
Dorukhan Arslan
  • 2,676
  • 2
  • 24
  • 42
4
votes
1 answer

Ruby's equivalent of libphonenumber findNumbers

Being aware of these two gems for dealing with phone: https://github.com/daddyz/phonelib https://github.com/sstephenson/global_phone But none of them seems to implement the findNumbers method present in the original lib. public…
Paulo Fidalgo
  • 21,709
  • 7
  • 99
  • 115
4
votes
3 answers

compare two phone numbers

I am trying to find if two phone numbers are same or not (Two same phone number may not be in same format , as +11234567890 is same as 1234567890 and 0011234567890) I tried PhoneNumberUtils.Compare like…
Arashdn
  • 691
  • 3
  • 11
  • 25
4
votes
0 answers

parsing phone numbers in Node JS using libphonenumber

I need to parse all the phone numbers extracted from my phonebook to lets say a flat file The input will be a list of phone number strings which can be of the form (considering my location is India) +91-99XXXXXXXX 98XXXXXXXX 098XXXXXXXX 011-25XXXXXX…
Mandeep Singh
  • 7,674
  • 19
  • 62
  • 104
4
votes
2 answers

Why does the libphonenumber website return a different result from the libphonenumber library?

I'm using the below link: http://libphonenumber.googlecode.com/svn/trunk/javascript/i18n/phonenumbers/demo-compiled.html phone number: 96596032346 region code: KW the link returns that the number is valid. I'm using the library in C# as below : …
3
votes
2 answers

libphonenumber php usage

I am looking at using libphonenumber to convert numbers into friendly local phone numbers eg. if 19311234567 is entered it returns (931) 123 4567 I found a php version of libphonenumber here: https://github.com/davideme/libphonenumber-for-PHP but I…
Lawrence Cooke
  • 1,567
  • 3
  • 26
  • 52
1 2
3
15 16