For the complete documentation index, see llms.txt. This page is also available as Markdown.

Add Push Notification Support

Ask Base44's AI to add Twinr push notifications, and finish the setup in your dashboard.

Push notifications need two halves: your app asks Twinr for a device token and stores it, and Twinr sends to that token later.

Ask the AI

With the MCP server connected, ask Base44:

Add Twinr push notifications to my app. Use the Twinr MCP tools to get what you need.

The AI fetches Twinr's push guide and writes the code.

Answer its question

It will ask who your notifications are for:

  • Everyone — every device that opens your app can receive a notification. No sign-in needed.

  • Specific people — notifications aimed at one user. This needs sign-in and somewhere to store each person's device token. Base44's built-in database and authentication make this straightforward, and the AI will wire them up.

What the code does

The AI adds a call to twinr_push_token_fetch(), which asks the app for the device's push token. The call is guarded, so in an ordinary browser it does nothing and your site is unaffected.

If you chose per-user notifications, it stores the token against the signed-in user so you can send to that person later.

Publish, then finish in Twinr

Publish your Base44 app. The code does nothing until it is live, and your Twinr app loads the published site.

Then enable push notifications for your app in Twinr — see Push. Until that is done your app requests a token and gets nothing back, which is the usual reason push appears not to work.

Test it

  1. Build your app and install it on a real device — push does not work in a browser or the previewer.

  2. Open the app and let it register.

  3. Send a test notification from Twinr.

Debugging inside the app? Use alert() rather than console.log() — console output is not visible on a phone.

Last updated