Local Push SDK
Send notifications from your app without internet connection.
Written By despia
Last updated About 1 year ago
SDK Usage
// Basic notification
window.despia = `sendlocalpushmsg://push.send?s=60=msg!Hello&!#New Message&!#https://myapp.com`Examples
Simple Alert
const seconds = 5
const title = "Quick Reminder"
const message = "Don't forget to save!"
const url = "https://myapp.com/save"
window.despia = `sendlocalpushmsg://push.send?s=${seconds}=msg!${message}&!#${title}&!#${url}`
Delayed Notification
// Send after 1 hour
const seconds = 3600
const title = "Workout Time"
const message = "Time for your daily exercise"
const url = "https://myapp.com/workout"
window.despia = `sendlocalpushmsg://push.send?s=${seconds}=msg!${message}&!#${title}&!#${url}`
Reminder
// Send after 30 minutes
const seconds = 1800
const title = "Task Due"
const message = "Complete your daily tasks"
const url = "https://myapp.com/tasks"
window.despia = `sendlocalpushmsg://push.send?s=${seconds}=msg!${message}&!#${title}&!#${url}`
Tips
Works offline
Time is set in seconds
Include clear messages
Add relevant URLs
Test with different delays
Need help? Email us at support@despia.com