Skip to main content
The video uses a specific AI coding tool to demonstrate the setup, but the configuration works 1:1 with Cursor, Claude Code, or any other tool. Despia is web framework and tooling agnostic, so the only thing that matters is the SDK call with the scheme parameters.
sendlocalpushmsg:// schedules a local notification on the device after a delay you specify in seconds. The OS surfaces the notification even if your app is closed, and tapping it opens the URL you passed in. Everything happens client-side, no server, no network call, no OneSignal account required.
This feature is fully supported and a good fit for short-lived, contextual reminders that the user just set themselves (a 10-minute timer, a “remember to drink water in 2 hours” tap). For anything else, especially anything where your backend is the source of truth (scheduled marketing, transactional alerts, time-zone-aware drip sequences), use OneSignal instead. OneSignal’s send_after and delayed_option: timezone parameters cover the same scheduling space with the durability and observability of server-sent push.

Installation


How it works

The scheme packs four values into a single URL: delay in seconds, message body, title, and deep-link URL. The runtime registers the notification with the OS scheduler and returns immediately. There is no return value and no callback when the notification fires.
The format is fixed: s= followed by the delay, =msg! followed by the body, &!# followed by the title, &!# followed by the deep-link URL. The unusual delimiters exist so the scheme parser can tell the four fields apart even when their values contain spaces or punctuation.

Scheme parameters

Encode any user-supplied values with encodeURIComponent to avoid breaking the parser when the message or title contains &, #, !, or =.

Schedule a self-set reminder

The natural fit for offline push is a reminder the user just set themselves. The interaction is one-shot, the delay is short, and the user already knows what’s coming, so a server is unnecessary.

When to reach for OneSignal instead

Offline push is the right tool when the user just set the reminder, the delay is short, and missing the notification would not break anything. Reach for OneSignal when any of the following apply: For anything where your backend should be the source of truth, OneSignal is worth the integration cost. Offline push is best kept to user-initiated, in-the-moment reminders.

Resources

NPM Package

despia-native