Anyone know if there is a way to...
1) Retrieve a set of valid URL schemes for a given device
2) Test if a URLRequest is legal before invoking navigateToURL()
I'm basically trying to determine if a SMS URL, i.e. "sms://+12345678911" will properly invoke the text messaging app on an arbitrary device. For example, it won't work on an iPad or iPod Touch, but it will work on an iPhone. If the device isn't capable, I'd like to provide alternate functionality.
Someone suggested iterating the network interfaces for cellular hardware, but the NetworkInfo classes aren’t supported in iOS. Even if they were, having a 3G network interface doesn’t necessary mean an SMS URL scheme will work properly (e.g. 3G-enabled iPads).
Thanks in advance for any advice...
There isn't a way to pull a list. You can make the request and listen for the fault/error.
You could also look at the Capabilities class and determine which device you are on and determine if you use sms or not dependent on the device your application is running on.
thanks for the suggestion marvin. the problem with that approach is that a database of all devices and their capabilities would need to be maintained and checked against. if we're just talking ipads, iphones and ipod touches, that's reasonable; but there's a huge and growing number of android devices out in the wild and they all have different capabilities...?