phone-number

How to construct a telephone number link on Android that includes an extension

允我心安 提交于 2019-11-30 01:23:15
问题 On a web page I have a link to a telephone number with extension like this: <a href="tel:011234404,123456">call now</a> When I tap this link in an iPhone browser, the iPhone will dial 011234404 and then when the call is answered it will dial the extension 123456. This is wonderful, however it does not appear to work at all on android (the main number is dialed and the extension is ignored). Other people seem to be using ";" or even "p" instead of the comma separator on Android with some

Phone number format in android

六眼飞鱼酱① 提交于 2019-11-29 23:25:36
问题 In my application, I have a editText which will accept phone number from the user, My target is, as soon as user enters the phone number it should be formatted (Like by applying on text changed listener) , format is like XXX-XXX-XXXX . I wrote the code as ePhone.addTextChangedListener(new TextWatcher() { private Pattern pattern; private Matcher matcher; String a; @Override public void onTextChanged(CharSequence s, int start, int before, int count) { // TODO Auto-generated method stub boolean

Javascript RegExp - extract phone numbers from string

爷,独闯天下 提交于 2019-11-29 21:58:02
问题 I have the following working regex to extract a lot of phone numbers in different formats. See here: http://jsfiddle.net/SB5Ly/4/ var regex = new RegExp( "\\+?\\(?\\d*\\)? ?\\(?\\d+\\)?\\d*([\\s./-]?\\d{2,})+", "g" ); .... (If the script didn't load, press the "Run" button from the top menu) As you can see in the example (by following the link), the last 2-3 phone number formats (var phoneNumbers) doesn't match the used regex. You can test the regex modifying it in the script and running it.

Web based API that can tell me if a number is a landline or cell phone? [closed]

丶灬走出姿态 提交于 2019-11-29 21:04:32
My application sends SMS messages to people, but the numbers entered in as their cell phone are sometimes land lines (this is user error or the user not really knowing if the contact number they have is a cell phone or landline.) I found a few websites that can tell me if a number is a landline or cell phone, but they do not offer programatic API's. Is anyone aware of a way a web application can figure out if a number can receive SMS messages? I guess a test SMS message is one way, but my current SMS gateway fails hard when it gets a landline number and doesn't tell me the landline number it

Extracting phone numbers from a free form text in python by using regex

≡放荡痞女 提交于 2019-11-29 18:07:22
I have to extract phone numbers from free form of texts. How can I manage it by using reg-ex in python? I have found for one in order to extract e-mail addresses. https://gist.github.com/dideler/5219706 I have implemented the same approach by using a phone number regex instead of e-mail address regex, but I couldn't get output. def get_phoneNumber(text): phone_number = "" regex = re.compile("((\(\d{3,4}\)|\d{3,4}-)\d{4,9}(-\d{1,5}|\d{0}))|(\d{4,12})") for phoneNumber in get_phoneNumbers(text, regex): phone_number = phone_number + phoneNumber + "\n" return phone_Number def get_phoneNumbers(s,

Allow number to start with ZERO when stored in mysql integer field

做~自己de王妃 提交于 2019-11-29 17:38:54
问题 I need to store phone numbers starting with 0 but whenever i try to store this in MySql table the starting ZERO is removed because no number start with Zero actually. How to solve this issue? Do I need to change the field type from Integer to another type? 回答1: change data type to unsigned-zerofill whatever you are using, float, int, decimal(6,2)... only edit the field to unsigned-zerofill 回答2: Phone numbers are not really numbers in the sense that they aren't ordinal. They're just characters

How to remove non numeric characters from phone number in objective-c?

感情迁移 提交于 2019-11-29 17:19:04
问题 This is my first attempt to make an ios app. I'm using people picker to ask the user for a phone number, but when it retrieves with the code below, my NSString *phone apears like (0) 111192222-2222. I'm from Brazil and here the correct mask for mobile phone numbers is (01111) 92222-2222 (the 9 is optional, some numbers have others don't). How to fix this mask? Or remove it entirely? - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker

Reading device phone number throws NULLPointerException

青春壹個敷衍的年華 提交于 2019-11-29 16:50:49
I am trying to read the phone number of the device using the following code. When phone number is not available I read the subcriber id. It works in some phones and throws NULL pointer exception in some devices. The device log shows I am getting NULL pointer exception in the following line if(MyPhoneNumber.equals("")) Please let me know how to make it work in all devices. TelephonyManager tMgr =(TelephonyManager)ShowMyLocation.this.getSystemService(Context.TELEPHONY_SERVICE); String MyPhoneNumber = tMgr.getLine1Number(); if(MyPhoneNumber.equals("")) MyPhoneNumber = tMgr.getSubscriberId(); jeet

Phone Number Columns in a Database

人走茶凉 提交于 2019-11-29 16:41:20
问题 In the last 3 companies I've worked at, the phone number columns are of type varchar(n). The reason being that they might want to store extensions (ext. 333). But in every case, the "-" characters are stripped out when inserting and updating. I don't understand why the ".ext" characters are okay to store but not the "-" character. Has any one else seen this and what explanation can you think of for doing it this way? If all you want to store is the numbers, then aren't you better off using an

Retrieving a phone number with ContactsContract in Android - function doesn't work

我只是一个虾纸丫 提交于 2019-11-29 15:21:23
问题 I wrote the following function in order to retrieve one single phone number that belongs to the contact with id "contactID". The function which is to retrieve the phone number: private String getContactPhone(String contactID) { Uri uri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI; String[] projection = null; String where = ContactsContract.CommonDataKinds.Phone.CONTACT_ID +" = ?"; String[] selectionArgs = new String[] { contactID }; String sortOrder = null; Cursor result =