urltoapp.dev
Learn

Push notifications for a URL app

Notifications are the most-requested feature for URL apps and the one most often built wrong. The browser method your site uses today won't work inside the app.

Updated Oct 20262 min readurltoapp.dev

Short answer

Web push (the Push API used by browsers) is not available in Android WebViews, so a URL app needs native push: the app includes a push SDK such as Firebase Cloud Messaging or OneSignal, asks for notification permission (required on Android 13+), and receives messages even when closed. Each message can carry a URL so tapping it opens that page in the app.

Why your site's push setup doesn't carry over

Browser push relies on a service worker and the browser's own push service. A WebView supports service workers for caching, but not the Push API or Notification API. So nothing your site registers in the browser reaches users of the app.

How native push works in a URL app

  1. The app is built with a push SDK and your project's ID (for OneSignal, just an App ID).
  2. On first launch, Android 13+ asks the user to allow notifications. Ask at a sensible moment — after sign-up beats the very first second.
  3. The SDK registers the device and returns an ID. Linking that ID to the logged-in user (through a small JavaScript bridge or the SDK's external user ID) lets you message specific people.
  4. You send from the provider's dashboard or API. Include a url in the message data so the app opens that page.

What to send

  • Order and booking updates, replies, reminders — messages users expect.
  • Not daily “come back” nudges. Users who turn notifications off rarely turn them on again; Android also groups and throttles noisy apps.

Play policy notes

Notifications must not be ads disguised as system messages, and your Data Safety form must mention the device identifiers your push provider collects. Push also counts as genuine app functionality — one of the things that helps a URL app pass Play's minimum functionality review.

FAQ

Can a WebView app receive notifications when closed?

Yes, with native push (FCM/OneSignal). The SDK runs independently of the WebView.

Is OneSignal free for URL apps?

OneSignal has a free tier for mobile push; check its current limits. FCM itself is free.

Do I need google-services.json?

For direct FCM, yes. OneSignal handles the Firebase side for you with just its App ID.

Read next