wei7111620
Posts: 0
Joined: Wed Sep 17, 2014 3:55 pm

Call and SMS buttons not functioning

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!

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Call and SMS buttons not functioning

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

wei7111620
Posts: 0
Joined: Wed Sep 17, 2014 3:55 pm

Call and SMS buttons not functioning

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.

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Call and SMS buttons not functioning

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? :-D

Cheers,
M&M

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Call and SMS buttons not functioning

Hi,

Please check whether there are errors in browser console.

wei7111620
Posts: 0
Joined: Wed Sep 17, 2014 3:55 pm

Call and SMS buttons not functioning

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.

wei7111620
Posts: 0
Joined: Wed Sep 17, 2014 3:55 pm

Call and SMS buttons not functioning

I noticed some new permissions for android. Could it be the reason?
Thanks

wei7111620
Posts: 0
Joined: Wed Sep 17, 2014 3:55 pm

Call and SMS buttons not functioning

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.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Call and SMS buttons not functioning

Hi wei,

Could you please show the code that you're using for triggering skype app?

wei7111620
Posts: 0
Joined: Wed Sep 17, 2014 3:55 pm

Call and SMS buttons not functioning

Hi,

I used the following JavaScript at button click event:
window.location.href = “tel:+375292771265′′;

Can't seem to trigger it on my phone.

Return to “Issues”