SteveLacy
Posts: 6
Joined: Fri Apr 20, 2012 11:54 pm

window.location.href no longer working on Android

I have some buttons in my app that when clicked will call a number, or send an sms, etc.

This has been working for a few years in my app where I have an "on click" action calling the following javascript:

window.location.href = 'sms:18885551234';

This code no longer works on Android since I've updated my app to the latest Appery editor and library. Nothing happens when you click the button. In the web test, the console doesn't report any errors and the browser responds to the click. But if you test it in the Android tester app, nothing happens when you click. We also found the released Android app doesn't work either.

We changed the code to:

window.open('sms:18885551234', '_self', false);

and it works on Android, but it also launches a browser window prior to launching the sms program on the phone.

Is there a way to get the window.location.href working again on Android devices? We did find that the window.location.href does still work on iOS devices.

Any help is greatly appreciated

SteveLacy
Posts: 6
Joined: Fri Apr 20, 2012 11:54 pm

window.location.href no longer working on Android

Awesome! Thanks. I guess the key to not launch the browser was the '_system'. Thanks so much!

Return to “Issues”