What do I write in Javascript after the Event of Clicking a button to call a number in local storage?
Thanks in advance!
What do I write in Javascript after the Event of Clicking a button to call a number in local storage?
Thanks in advance!
Hello Viktor,
To get localStorage variable value use this code
prelocalStorage.getItem('name');/pre
Where name - localStorage variable name
How to launch dealer you can find here https://devcenter.appery.io/documenta...
tried like this for android:
window.location.href = "tel:" + localStorage.getItem('ad_number');
didn't work.. and how for iOS?
window.open('tel:' + localStorage.getItem('ad_number'), '_system');
?
thanks
Hello, what value of the "ad_number" localStorage variable? Please use static string value for testing features instead of full code.
Value of the "ad_number" is simply a telephone number. Sorry your second sentence didn't make much sense to me, Im a beginner. Thanks
Does it include plus ("+") symbol? Do you test native application or in browser? Could you check are there any errors in console? This (https://devcenter.appery.io/documenta...) should help.
Yes it does include "+" (if to complicated, it won't). Currently testing on the Appery Tester app on android. Nothing happends when I click the button.
However the iOS one works, I think, since it opens FaceTime on my Macbook when I click on it in the browser. On my mac there is no difference whether there is "+" before the numer or not.
Hi Viktor,
Please try this JS code:
pre
window.open('tel: +12345678', '_system');
/pre
Regards.