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!

mvp_badge
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.

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!

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.

mvp_badge
MVP

Hi Irfan,

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

Regards

Fabio

Thanks Fabio for swift reply.

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

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




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