Iterable<PhoneNumberMatch> phoneNumberMatchIter = phoneNumberUtil.findNumbers(meetingBody, "US", Leniency.VALID, 1000);
where meetingBody = "000 800 852 1444"
The number is not being detected.
Any idea why? Am I passing wrong arguments to the findNumbers method?
-Meghaditya
I am using libPhoneNumber is a project as follows -Iterable<PhoneNumberMatch> phoneNumberMatchIter = phoneNumberUtil.findNumbers(meetingBody, "US", Leniency.VALID, 1000);
where meetingBody = "000 800 852 1444"
The number is not being detected.
Any idea why? Am I passing wrong arguments to the findNumbers method?
On 5 February 2015 at 06:24, Meghaditya Roy Chaudhury <aditya.ro...@gmail.com> wrote:I am using libPhoneNumber is a project as follows -Iterable<PhoneNumberMatch> phoneNumberMatchIter = phoneNumberUtil.findNumbers(meetingBody, "US", Leniency.VALID, 1000);
If this is an India number, why are you using the region code "US" rather than "IN"?
where meetingBody = "000 800 852 1444"
Is this a valid India number? Have you successfully called it? What this number supposed to be, in E.164 format? It doesn't look like an India toll-free number.The number is not being detected.
Any idea why? Am I passing wrong arguments to the findNumbers method?
private static final PhoneNumber INTERNATIONAL_TOLL_FREE = new PhoneNumber().setCountryCode(800).setNationalNumber(12345678L);
On Thursday, February 5, 2015 at 2:45:34 PM UTC+5:30, David Yonge-Mallo wrote:On 5 February 2015 at 06:24, Meghaditya Roy Chaudhury <aditya.ro...@gmail.com> wrote:I am using libPhoneNumber is a project as follows -Iterable<PhoneNumberMatch> phoneNumberMatchIter = phoneNumberUtil.findNumbers(meetingBody, "US", Leniency.VALID, 1000);
If this is an India number, why are you using the region code "US" rather than "IN"?
The default region for my project is US, but nevertheless, setting default to 'IN' doesn't work either.
On Thursday, February 5, 2015 at 2:45:34 PM UTC+5:30, David Yonge-Mallo wrote:On 5 February 2015 at 06:24, Meghaditya Roy Chaudhury <aditya.ro...@gmail.com> wrote:I am using libPhoneNumber is a project as follows -Iterable<PhoneNumberMatch> phoneNumberMatchIter = phoneNumberUtil.findNumbers(meetingBody, "US", Leniency.VALID, 1000);
If this is an India number, why are you using the region code "US" rather than "IN"?The default region for my project is US, but nevertheless, setting defaut
where meetingBody = "000 800 852 1444"
Is this a valid India number? Have you successfully called it? What this number supposed to be, in E.164 format? It doesn't look like an India toll-free number.The number is not being detected.
Any idea why? Am I passing wrong arguments to the findNumbers method?
Yes it is a valid number (http://en.wikipedia.org/wiki/Toll-free_telephone_number#Universal_International_Freephone_numbers). But it follows to the International free number format. I observed it works if I have '1 800 xxx xxxx', but not if '0 800 xxx xxxx'. I was looking at the unit test data for the 'libPhoneNumber' project, it showed me for international numbers it follows this as test data -private static final PhoneNumber INTERNATIONAL_TOLL_FREE = new PhoneNumber().setCountryCode(800).setNationalNumber(12345678L);
Is the leading zero/zeroes the main issue here?
--David Yonge-MalloSoftware Engineer - Google ZürichÎñţérñåţîöñåļîžåţîờñ and เภՇєгﻮคɭคςՇเςเչคՇเ๏ภ Engineering
--
You received this message because you are subscribed to the Google Groups "libphonenumber-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libphonenumber-di...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.