pkdevbox / iui

Automatically exported from code.google.com/p/iui
MIT License
0 stars 0 forks source link

Add sms: itms: and callto: to nativeUrlPatterns #319

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This is a feature suggestion, not a bug per se.

There are several native URL patterns that would make nice additions. I've 
added these to my local copy,

    new RegExp("^sms:"),
    new RegExp("^itms:"),
        new RegExp("^callto:")

The sms: URL scheme brings up a dialog to send a text message to the given 
number. This appears to work fine on both iPhone and Android. The itms: scheme 
launches the iTunes store on iOS (though not on Android, since it doesn't have 
an iTunes store :-). The callto: scheme works like tel://, but launches Skype 
if it is installed and there is no native phone capability (should work with 
Skype on the iPad, e.g., but I have only tested this on the desktop). 

Note that sms: and callto: should *not* have // appended to them. Thus, 
sms:555-1212 or callto:555-1212, not sms://555-1212 or callto://555-1212.

Original issue reported on code.google.com by tony.hu...@gmail.com on 21 Nov 2011 at 2:22

GoogleCodeExporter commented 8 years ago

Original comment by msgilli...@gmail.com on 22 Nov 2011 at 6:14

GoogleCodeExporter commented 8 years ago
Should we just keep adding patterns to the nativeUrlPatterns array or should we 
say anything that is not http:// or https:// as a native URL and only use 
patterns once we've determined it's http:// or https:// ??

Original comment by msgilli...@gmail.com on 7 Feb 2012 at 12:20

GoogleCodeExporter commented 8 years ago
If you need to add URL patterns to the list of nativeUrlPatterns, you can do 
something like this:

iui.nativeUrlPatterns.push(new RegExp("^sms:"));

after the iui.js script has been loaded.

Original comment by msgilli...@gmail.com on 7 Feb 2012 at 12:40

GoogleCodeExporter commented 8 years ago
callto: and sms: links are supported in 0.4-beta3 and later.
I did not add itms links since they are deprecated.  If you need them you can 
use:

iui.nativeUrlPatterns.push(new RegExp("^itms:"));

Original comment by msgilli...@gmail.com on 22 Jul 2012 at 9:15