# Local Notification in Page

**Local Notification** is a mobile‑specific feature that allows an application to display **scheduled notifications directly on the user’s device**, similar to a reminder or alert application.\
These notifications are **local to the mobile application** and do not rely on server‑side triggers.

Local Notifications are commonly used for:

* Reminders and alerts
* Follow‑up notifications
* Scheduled user prompts
* Offline notifications

***

### Key Characteristics

* Notifications are triggered **locally on the device**
* Configuration is **manual only**
* All notification details are defined using **JavaScript**
* Local Notification functionality is provided through a **built‑in plugin** in Page Designer

> **Note:**\
> Local Notifications are not push notifications and require the mobile application to be installed on the device.

***

### Configure Local Notification

Currently, Local Notification setup is performed manually using **JavaScript**.

When configuring a Local Notification, the following details must be specified:

* **Notification title / topic**
* **Notification content or description**
* **Scheduled time for notification**
* Optional behavior or trigger logic

Page Designer provides a **Local Notification plugin** that can be invoked using JavaScript actions.

***

### Local Notification Plugin

The plugin for Local Notification is available directly within **Page Designer** and can be referenced when configuring JavaScript actions.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FWbPejwZpoYpoG5Axb44Y%2Fimage.png?alt=media&#x26;token=8919eab7-060c-47b4-82a0-32e8e2a83630" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Local Notification plugin in Page Designer</em></p>

Using this plugin, developers can:

* Schedule notifications at a specific time
* Customize notification messages
* Trigger reminders based on app logic

***

### Typical Implementation Flow

A common Local Notification setup includes:

1. Create a **Button** or trigger event on a mobile page
2. Attach a **JavaScript Action** to the button
3. Use the Local Notification plugin to define:
   * Message content
   * Trigger time
4. Save and test in the mobile runtime

The notification will appear on the device at the configured time, even if the application is running in the background.

***

### Design Perspective

As part of **Mobile UX best practices** on ONEWEB:

* Use Local Notifications for **time‑based reminders**
* Avoid excessive notifications that may annoy users
* Clearly explain notification purpose to users
* Test notification behavior on real devices

Local Notifications work best when combined with:

* **Local Storage** (offline data)
* **Sync Service** (data consistency)
* **User‑controlled triggers**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onewebstack.com/oneweb-platform-th/building-apps/ui-page-designer/ux-ui-components/pages/page-features/local-notification-in-page.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
