SebWoh
SebWoh

Reputation: 41

Detect sms: browser support on Browser

I have a problem with a mobile page and sms: links. The page is mainly visited by android and iOS based smartphones via QR-scanning apps.

Especially on the iPhone there are a few QR-Apps with integrated Browsers (instances of webkit?), which don't support sms: Links (bad. and don't know why). Default Browsers do support sms: links without any problems.

I'd like to disable the sms: links, if there isn't support.

If anyone has an idea how to detect it (via javascript or php) that would be nice!

Upvotes: 2

Views: 1028

Answers (2)

Terence Eden
Terence Eden

Reputation: 14304

Easiest way is to use DeviceAtlas or WURFL. They both have databases of mobile phone properties. You can use server-side detection (PHP) or they have APIs for use with JavaScript.

In WURFL, the property "xhtml_send_sms_string" will tell you if you can use sms: or smsto: or if it isn't supported.

In DeviceAtlas, the property "uriSchemeSms" or "uriSchemeSmsTo" will tell you the same thing.

Upvotes: 1

Damien
Damien

Reputation: 5882

I don't think you can detect it, but maybe you can try to read the User Agent of the QRCode integrated browser? (should be a WebView, and there is hope than WebView doesn't have a proper User Agent).

Here is the code to disable auto-linking anyway:

<meta name="format-detection" content="telephone=no">  

Upvotes: 1

Related Questions