1024
Views
8
Comments
Solved
Phone call from a mobile app
Question

Hello,


I am building a mobile app. I want to have a button that the user clicks. When the user clicks the button the app must initiate a phone call from the device to a number that I give it to dial. 


Can anyone let me know how to do this? Is there a forge component that I can use to initiate the call on the device?


Thanks so much!

2019-09-24 18-41-25
Jorge Martins
 
MVP
Solution

Hi Time Toep,

You should be able to use links/buttons with a destination of "tel:123456789" (where 123456789 would be the phone number you want to call... remember to use international dialling codes). It will open a popup asking if you want to call that number.

UserImage.jpg
Time Toep

Jorge Martins wrote:

Hi Time Toep,

You should be able to use links/buttons with a destination of "tel:123456789" (where 123456789 would be the phone number you want to call... remember to use international dialling codes). It will open a popup asking if you want to call that number.


Problem solved! Thanks so much!

2019-11-25 08-52-26
Irfan

Hi Jorge,

I choose LinkTo option and enter the destination as "tel:+91-123456789"  ,but it is not allowing me to have the destination like this. The OK button is not enabled.

2026-03-09 12-26-51
Fábio Fantato
 
MVP

Hi Irfan,

You should define the destination to the RedirectToURL and put the "tel:+91-123456789" as the URL parameter.

Regards

Fabio

2019-11-25 08-52-26
Irfan

Thanks Fabio for swift reply.

2021-07-06 14-21-28
mahdi ben dhafer

Can the Phone number be a variable we extract from an aggregate ?? if yes how so ? and thanks in advance ^^

2023-08-24 15-18-41
ANDRES MAYR

Hi 


Yes , you can, 


in the reactive platform , just need to add to the phone number a "linkto" -> client action. 


in the client action you just need to asign a local variable "phone" to the current phone number that you are clicking , next in the flow will be add a simple javascript : 

window.location = "tel:"+$parameters.phoneNumber, BELOW IN THE "PARAMETER CLICK "NEW PARAMETER" ( phoneNumber)


phoneNumber is the javascript parameter. 


then, just asign that parameter to the local variable "phone" that you prepare before. 

in simple the flow should look like : 


START -> ASSIGN PHONE (VARIABLE:PHONE VALUE:GETCLIENTS.LIST.CURRENT.MOBILE) -> JAVASCRIPT (window.location = "tel:"+$parameters.phoneNumber) -> end 


remember in the javascript setting ( in the right) you must set phoneNumber with the value phone




UserImage.jpg
Federico Locatelli

Hi Andres, 

thanks to your comment i was able to introduce the function in my reactive app.

The only problem is that when i go back to the app screen i get this:

Is there a workaround to this so that if the user goes back to app doesn't have to press the reload button?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.