1. Home
  2. Handbook
  3. Phone, email & WhatsApp links

// handbook · make it feel like an app

Phone, email, WhatsApp and map links in a WebView app

Call, email, WhatsApp and directions buttons are often the whole point of a small business app. They're plain links — but inside an app they must hand over to another app, so format matters.

updated · 3 min read · APK Builder team

Short answerUse standard link formats: tel:+15551234567, mailto:name@example.com?subject=Hi, sms:+15551234567, https://wa.me/15551234567?text=Hello and https://maps.google.com/?q=Address. A WebView app shell passes these to the phone's dialer, email, messaging, WhatsApp and Maps apps. Test each on a real phone after building.

Link formats

ActionLink
Calltel:+15551234567
SMSsms:+15551234567?body=Hello
Emailmailto:hi@example.com?subject=Order&body=Hello
WhatsApp chathttps://wa.me/15551234567?text=Hello
Directionshttps://maps.google.com/?q=12+Harbour+Street or geo:0,0?q=12+Harbour+Street
Share textnavigator.share({ text, url }) where supported

Phone numbers go in international format. For wa.me, use digits only — no plus sign, spaces or dashes. Encode message text with encodeURIComponent().

How the hand-off works

A WebView can only display web pages. When a link uses a scheme it can't show (tel:, mailto:, geo:…), a well-built app shell catches it and asks Android to open the matching app. https://wa.me and Maps links are normal web addresses that Android hands to the WhatsApp or Maps app when installed.

External websites

Links to other websites may open inside your app or in the phone's browser, depending on the shell and its settings. For links you definitely want outside the app — payment pages, social profiles, long articles — use target="_blank", which most shells treat as "open externally". Test the behaviour you need after building.

Testing checklist

  • Tap every call, email, WhatsApp and map button on a real phone.
  • Try a phone without WhatsApp installed — wa.me should fall back to a web page.
  • Check that pressing Back after the hand-off returns to your app.

The restaurant menu and product catalogue blueprints include working examples.

function waLink(number, message) {
  const digits = number.replace(/\D/g, '');          // "+1 (555) 010-4567" → "15550104567"
  return 'https://wa.me/' + digits + '?text=' + encodeURIComponent(message);
}
function mailLink(to, subject, body) {
  return 'mailto:' + to + '?subject=' + encodeURIComponent(subject) +
         '&body=' + encodeURIComponent(body);
}

Always encode message text — an unencoded & or # cuts the message short.

Make contact buttons obvious

  • Use a full-width button with a clear verb: "Call to book", "Order on WhatsApp", "Get directions".
  • Show the number or address as text too, so users can copy it.
  • Put the most important action within thumb reach, near the bottom of the screen.

The product catalogue blueprint builds a WhatsApp order message with quantities and a total — open its live preview and add an item to see the link it creates.

Questions

Do tel: links work in an Android WebView app?

Yes, when the app shell hands non-web links to Android. Test on a phone after building.

What is the WhatsApp link format?

https://wa.me/ followed by the number in international format with digits only, then ?text= and URL-encoded message text.

How do I make a link open in the browser instead of the app?

Use target="_blank"; most WebView shells open those links externally. Confirm on a phone.

Read next

// ready when you are

Build your APK — free.

No Android Studio, no code, no watermark. Pick your input: