Page 2 of 3

how to make a phone call

Posted: Sun Dec 22, 2013 7:21 am
by Ketan Patil

on click of label i set local storage variable pn1 with phone no. from lable.

on pop up i put a button and in click event put js
window.location.href='tel:' + pn1;

after running app on real phone it is not working


how to make a phone call

Posted: Sun Dec 22, 2013 7:46 am
by Igor

To get value from local storage please use next code:
pre
localStorage.getItem('pn1');
/pre
Your code should be like this:
pre
var phone=localStorage.getItem('pn1');
window.location.href='tel:' + phone;
/pre


how to make a phone call

Posted: Sun Dec 22, 2013 9:50 am
by Ketan Patil

i tried it on phone .
it just send no. 5 to call.

if i put direct no. instead of local storage i will send that no. to call.


how to make a phone call

Posted: Sun Dec 22, 2013 10:44 am
by Igor

Please try to put next code on button click event:
pre
window.location.href='tel:8805693250';
/pre

Does it work for you?


how to make a phone call

Posted: Sun Dec 22, 2013 10:47 am
by Ketan Patil

as i told u , i want to dial the no. fetched from database not a fix no.


how to make a phone call

Posted: Sun Dec 22, 2013 12:16 pm
by Ketan Patil

the person is not knowledgeable


how to make a phone call

Posted: Sun Dec 22, 2013 12:54 pm
by Igor

Thank you for your feedback. Your opinion is very important for us.


how to make a phone call

Posted: Mon Dec 23, 2013 2:50 pm
by Kateryna Grynko

Hi Ketan,

What data do you store in Database?
Could you show us a screenshot of service response please?


how to make a phone call

Posted: Tue Dec 24, 2013 10:09 am
by Ketan Patil

I am storing number.
Fetching it to a label.
After touching label popup is opening.
On pop up there is a button for calling the number.


how to make a phone call

Posted: Tue Dec 24, 2013 12:38 pm
by Kateryna Grynko

Hi Ketan,

Let's try the following:prewindow.open("tel:" + Appery('label').text());/preWhere 'label' is a label where you mapped a number beforehand.