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
3
votes
2 answers

Quarkus, Apache directory api, google libphonenumber libraries don't work on native

This is a first microservice I'm writing in Quarkus. Language: Kotlin It's a simple service that reads data from LDAP DB based on some input parameters including mobile phone numbers. Everything works in jar build. In native build Google…
3
votes
2 answers

Phone number format from country code on iOS

I need to display phone number format as placeholder in UITextField. How can I do that? For country selection I'm using below mentioned library and it provides me country flag and country code against user selected…
Shahbaz Saleem
  • 317
  • 2
  • 14
3
votes
2 answers

Determine national carrier code using libphonenumber

I need to determine the national carrier code (not the country code) of any phone number, using libphonenumber Java SDK. How can I do this?
RedEagle
  • 4,418
  • 9
  • 41
  • 64
3
votes
1 answer

libphonenumber [Js] get country code only

I'm using libphonenumber with the npm package. The problem I have is this one: // Get an instance of `PhoneNumberUtil`. var phoneUtil = require('googlelibphonenumber').PhoneNumberUtil.getInstance(); phoneUtil.parse('+44') // throws…
pietro909
  • 1,811
  • 1
  • 19
  • 26
3
votes
2 answers

Reverse Phone Number Lookup Without Country Code

I have been using googles libphonenumber to perform validation of US phone numbers. Now I am needing international support for all countries. Is it possible to reverse lookup a phone numbers country code using libphonenumber? Say the DB has saved UK…
allencoded
  • 7,015
  • 17
  • 72
  • 126
3
votes
2 answers

Google libphone number for getting country name for the same country code

How do I use Google's libphone number https://github.com/googlei18n/libphonenumber to see if a phone number is Canada's or US' phone number as they share the same country code? example: +1415-555-0123 is U.S., San Francisco +1647-555-0123 is…
serverfaces
  • 1,155
  • 4
  • 22
  • 49
3
votes
0 answers

How to extract area code from phone number in libphonenumber in c#?

Please check the following c# code which retrieves area code from phone number AreaCodeMap map = new AreaCodeMap(); var areas = await _areas.GetAllAreasAsync(); SortedDictionary sortedMapForUS = new…
HamsterRoll
  • 107
  • 1
  • 16
3
votes
1 answer

Format Phone Number Real-Time using NBAsYouTypeFormatter

I have searched all over the place and I have seen many solutions to this, but most of it are really being "hackish" and error prone. I am trying to format the phone number on UITextField using the libPhoneNumber iOS Class…
JayVDiyk
  • 4,277
  • 22
  • 70
  • 135
3
votes
2 answers

How to download and use PhonenumberUtil

I found this library https://code.google.com/p/libphonenumber/ and wanted to use it in my project, but how to I install/download this library in Eclipse and how do I use it with my own project?
Diego
  • 4,011
  • 10
  • 50
  • 76
3
votes
5 answers

What does [++]*+ stand for in regexp

I'm using libphonenumber and I try to check some phone numbers if they are valid with regexp pattern VALID_PHONE_NUMBER which can be found here and it looks like this private static final String VALID_PHONE_NUMBER = DIGITS + "{" +…
Marian Paździoch
  • 8,813
  • 10
  • 58
  • 103
3
votes
1 answer

Javascript convert phone number from E164 to International format

Hello I have a phone number in it's E164 format : +212640588740 and I want to convert it to it's international format : +212 640-588740. There is this library http://code.google.com/p/libphonenumber/ that do this conversion very well but it…
OussamaLord
  • 1,073
  • 5
  • 28
  • 39
3
votes
0 answers

how to use libPhoneNumber-iOS for formats phone numbers on-the-fly when users enter each digit

libPhoneNumber has function AsYouTypeFormatter (formats phone numbers on-the-fly when users enter each digit). Work example: PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); AsYouTypeFormatter formatter =…
CHiP-love-NY
  • 507
  • 6
  • 14
2
votes
0 answers

Why are Indian phone numbers automatically prepending a 0 in Maz-UI

I am using Vuejs's Maz-UI framework, and specifically their phone number inputter. But there is an issue; when selecting Indian phone numbers, I type in some random 10 digit string of numbers. But instead of showing the (formatted) phone number on…
Andrew Baker
  • 145
  • 3
2
votes
2 answers

libphonenumber-js evaluates good phone number as false

I'm stumped. I've messed around with this for a while and it doesn't make sense. libphonenumber-js does not validate a phone number that should be a valid number. It returns 'false' every time. This seems pretty simple and straightforward. A 10…
Tex Evans
  • 47
  • 1
  • 8
2
votes
0 answers

Adding flags and country name into select drop down (libphonenumber-js)

I am trying to generate country names in the dropdown from libphonenumber-js and when selected, it will only show the flags. This is the demo of what I am trying to achieve. The dropdown: The flags as the selected option: My code looks like this…
HNG
  • 251
  • 3
  • 15