Sometimes Android and IOS require different Javascript for an action i.e. for sms IOS use sms:xxxx&body= where android is sms:xxx?body
What is the best way to achieve this without developing two applications. Currently I am using the following Javascript to determine if the user is Android or IOS.
var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") -1; //&& ua.indexOf("mobile");
if(isAndroid) {
.....
}else {...
Obvious this ignores windows phone...