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!
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:
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.
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
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?