Calling a phone number

What is the best method for calling a number when the webapp is running on a mobile phone?
Just displaying the number is possible. But I want to use a specific button which when pressed calls the build in dialer.

You could use a TWebLinkLabel and use the prefix tel: for the href attribute of the link in the TWebLinkLabel.

WebLinkLabel.Caption := '<a href="tel:+15555551212">555-555-1212</a>';

That I know. Problem is that is not a button. When driving in the car with the mobile phone in it's holder, I want a bigger space where I can press the button and call directly the number.
The weblinklabel is a bit small.

Ah. It is a bit early. I can ofcourse use the same code as the WebLinkLabel in the caption of the button.

You can also call from the button click event:'tel:+1800229933');
in case you do not  want to set the text in the button.

so basically you're saying that using the 'tel:' protocol on a web link will cause the phone's dialer panel to open and display that phone# so it can be called?

As an aside, how can the code know if it's running on a device that can make such a call? Or even let you select an alternate channel, like FB Messenger, WhatsApp, etc?

These are web standards.

Full list of URI schemes:

1 Like