Page 1 of 3
Call and SMS buttons not functioning
Posted: Sat Nov 15, 2014 5:38 pm
by wei7111620
Hi,
I have a call button and sms button which used to work. However, recently i made some changes to other components and realised that this window.location.href='tel:93205858'; doesn't work anymore.
May I know whether I did anything wrong?
Thanks!
Call and SMS buttons not functioning
Posted: Sat Nov 15, 2014 5:41 pm
by M&M
window.location.href = “tel:+375292771265′′;
Clicking on that button will open the dialer with pre-populated phone number:
You wana try the + in front?
iOS has some nuances when dialer or sms window should be opened. Try to use such code for iOS platform:
window.open(‘tel:+375292771265′, ‘_system’);
I am a newbie too but just hoping that helps 
Cheers,
M&M
Call and SMS buttons not functioning
Posted: Sat Nov 15, 2014 5:59 pm
by wei7111620
Hi,
Thanks for the reply!
However, adding the + doesn't work for me. Seems like my buttons events do not reach that line of code. I tried using an alert and it was triggered though.
Call and SMS buttons not functioning
Posted: Sat Nov 15, 2014 6:04 pm
by M&M
hi,
Then could it be the permissions? But then the best bet will be to move the code to just ahead of the alert box - first to confirm that there is no problem in invoking the dialer, or the messaging. Then you'll need to investigate the cause as to what is breaking the code. Console to the rescue? 
Cheers,
M&M
Call and SMS buttons not functioning
Posted: Sat Nov 15, 2014 7:14 pm
by Alena Prykhodko
Hi,
Please check whether there are errors in browser console.
Call and SMS buttons not functioning
Posted: Sun Nov 16, 2014 7:10 am
by wei7111620
Hi Alena,
I received this javascript error from firefox when i tried window.location.href='sms:87705858' :
NS_ERROR_UNKNOWN_PROTOCOL:
The call function window.location.href = “tel:+375292771265′′; is triggered in my browser but not responding when installed in my android phone.
Is there other way to troubleshoot? thanks.
Call and SMS buttons not functioning
Posted: Sun Nov 16, 2014 7:13 am
by wei7111620
I noticed some new permissions for android. Could it be the reason?
Thanks
Call and SMS buttons not functioning
Posted: Sun Nov 16, 2014 4:19 pm
by wei7111620
Hi,
I tried giving all android permissions and the test app in my browser did trigger skype application.
However, when i installed in my android phone, it doesn't trigger the dialer.
Anyone has an idea how can i resolve this?
Thanks.
Call and SMS buttons not functioning
Posted: Sun Nov 16, 2014 6:44 pm
by Illya Stepanov
Hi wei,
Could you please show the code that you're using for triggering skype app?
Call and SMS buttons not functioning
Posted: Sun Nov 16, 2014 11:50 pm
by wei7111620
Hi,
I used the following JavaScript at button click event:
window.location.href = “tel:+375292771265′′;
Can't seem to trigger it on my phone.