I had simple request come in the other week … Can you make the telephone numbers clickable on mobile phones so they can be dialed by clicking it? I know that both Android and the iPhone attempt to do this automatically. I also knew, for some reason, that the numbers were not clickable within entry cards in Connections. So this request prompted me to fire up Google to see if there was something I can do to help. As it turns out there is and it was an extremely simple change, that I found here: http://mobile.tutsplus.com/tutorials/mobile-web-apps/phone-number-links/. So, the next version of Connections, all telephone numbers will be clickable for dialing on Android, the iPhone and even the desktop. Yep, on the desktop too. That way if the user has Skype or another telephony app installed, they will be able to dial right from their desktop.
Sweet! Thanks
That would be great. One more tool to the Connections toolbox. :)
It’s great to see this – I am just implementing the Add-On, and it was one of the things that occurred to me in passing.
One thing I have run into in the past, having used tel: links extensively in past development: it is best to always format the phone numbers in the tel:// link as +1NPANXXXXXX for North American Numbering Plan (NANPA) numbers. All phone devices, VOIP/Skype systems will properly interpret & handle this, and for those that have international visitors, it will properly dial the number for them, too. Usually, this can be handled by checking the length of the number for 10 digits, if not starting with 1, or 11 digits if starts with 1.
There are some great PHP libraries available you can “borrow” code from if you need it, for phone number formatting detection, if you want to get fancy, unless you want to break down phone numbers by country code, area code, local portion and combine for display.
Great job on this (and the overall add-on!) – I look forward to exploring it more!
Bob
@Bob Parker
Many thanks for the tips, greatly appreciated! Right now he number format would be exactly as the user enters it. My casual testing showed on my Android [don’t have an iPhone] that parens, periods and hyphens seemed to be properly stripped out by the phone dialer … but now you have me wondering if I should run the number thru a regex to remove any characters that are not a number for the tel links. What’s your thoughts?
I’m not certain I want to delve into number validation. But in a feature revision I can definitely seek out libraries that already take care of this.