HTML SMS链接在“SAMSUNG Galaxy S6”上显示错误“err_unknown_url_scheme”

时间:2016-08-28 03:39:49

标签: javascript android jquery sms samsung-mobile

在我的网站中,我设置了一个按钮动作链接,生成html短信链接,用于发送短信与正文。在那里我使用JS设置了一些功能。现在尝试设置html短信链接它工作在我的Android设置“SAMSUNG DUOS 2”,并工作“三星Galaxy S4”,但没有工作一些Android设置像“三星Galaxy S6”。 它显示错误

  

“err_unknown_url_scheme”

我在短信按钮上的js功能点击

function openSMS(){
 var EmailMessage = "Can you please get the following items from Aherns:" + String.fromCharCode(13);
// remove the local storage
for (var index = 0; index < localStorage.length; index++) {

// check to see if its one of our shopping list items
if( localStorage.key(index).indexOf('ShoppingListStorage') >= 0){

  // get the key and value to add to email list
  var key = localStorage.key(index);
  var value = localStorage[key];

  EmailMessage = EmailMessage + value + String.fromCharCode(13);
} 
else {
  //alert(localStorage.key(index) + " not ShoppingListStorage ")
}
}  
var ua = navigator.userAgent.toLowerCase();
var url;

if (ua.indexOf("iphone") > -1 || ua.indexOf("ipad") > -1)
  url = "sms:;body="+EmailMessage;
else
  url = "sms:?body="+EmailMessage;

 window.location.href = url;

}

http://notundeal.com/aherns/ahernsshopping-v.2.html

enter image description here

0 个答案:

没有答案