Local Push Notifications

Schedule device notifications to engage users at specific times, even when your app is closed.

Overview

Local push notifications are scheduled directly on the device and trigger at predetermined times. Unlike remote push notifications that require a server, local notifications are perfect for reminders, timers, and scheduled events that don't require external data.

Prerequisites

  1. Install the Despia plugin from WeWeb Marketplace

  2. Verify installation: AssetsLibrary → check for "Despia Provider"

Implementation Steps

Step 1: Add Despia Plugin Component

  1. Click Add in WeWeb editor

  2. Navigate to Assets panel

  3. Find Despia ProviderDespia native

  4. Drag the Despia plugin to the top of your page

Step 2: Create Notification Trigger

  1. Add a trigger element (button, or any workflow event)

  2. Can be triggered by:

    • Button clicks

    • API success responses

    • Timer completions

    • Form submissions

    • Any workflow event

Step 3: Configure Notification Workflow

  1. Select your trigger element

  2. Go to Workflows → Add "On click" workflow

  3. Add action: Execute component action

    • Component: Despia plugin

    • Action: "Schedule local push notification"

    • Seconds: Delay before notification (minimum 5-10 seconds)

    • Title: Notification title

    • Message: Notification body text

    • URL: Optional deep link (leave empty to just open app)

Configuration Parameters

Timing

  • Minimum delay: 5-10 seconds recommended

  • Maximum delay: No limit (can schedule days ahead)

  • Dynamic timing: Can bind to variables or calculations

Content Fields

All fields can be static text or dynamically bound to:

  • Variables from your app

  • User data

  • API responses

  • Calculated values

Deep Linking

Optional URL parameter for navigation:

  • Leave empty: Opens app to current state

  • Internal route: Navigate to specific page

  • External URL: Open web links

Dynamic Scheduling Examples

Time-based Reminders

Schedule notifications before events by calculating the time difference

Recurring Notifications

Set up daily reminders at specific times using time calculations

Conditional Scheduling

Only schedule notifications based on user preferences or app state

Platform Behavior

iOS

  • Requires user permission on first use

  • Notifications appear in Notification Center

  • Supports rich notifications with actions

  • Respects Do Not Disturb settings

Android

  • Permission handling varies by version

  • Appears in notification shade

  • Can be customized with channels

  • Supports notification priorities

Publishing & Updates

  • Uses over-the-air updates

  • No app rebuild required

  • Instant deployment to all users

  • No App Store review needed

Best Practices

  1. Timing Considerations

    • Avoid notifications under 5 seconds (may fail)

    • Consider time zones for scheduled events

    • Respect quiet hours (evening/night)

  2. Content Guidelines

    • Keep titles concise (40 characters)

    • Make messages actionable

    • Use clear, specific language

    • Personalize when possible

  3. Frequency Management

    • Avoid notification fatigue

    • Allow user preferences

    • Group related notifications

    • Provide opt-out options

Common Use Cases

E-commerce

  • Abandoned cart reminders

  • Flash sale alerts

  • Order status updates

  • Wishlist price drops

Productivity

  • Task reminders

  • Meeting alerts

  • Daily summaries

  • Goal tracking

Health & Fitness

  • Workout reminders

  • Medication alerts

  • Water intake prompts

  • Sleep reminders

Education

  • Study reminders

  • Assignment due dates

  • Class notifications

  • Progress milestones

Limitations

  • No server updates: Content is fixed at scheduling time

  • Device-dependent: Won't sync across devices

  • App uninstall: All scheduled notifications are cleared

  • Storage limits: System may limit total scheduled notifications

If you want to programmatically send, cancel, and schedule push notifications from your backend, consider using our Remote Push Notification integration.

Troubleshooting

Notification not appearing:

  • Check minimum 5-second delay

  • Verify app notification permissions

  • Test with longer delays (30+ seconds)

  • Check device notification settings

Wrong timing:

  • Account for time zones

  • Verify seconds calculation

  • Test with fixed values first

Content issues:

  • Check character limits

  • Verify variable bindings

  • Test with static content

Need Help?

For additional support or questions, please contact our support team at support@despia.com

Updated on