Schedule Notification
Shows a notification later, even when the app is closed.
Category: Device · Can fail (wrap it in Try to handle that) · Takes time: the next step waits for it
#When to use it
Use it to remind people later, even when the app is closed: drink water, a due date, a break.
#Example
A Remind me button: Title: Drink water, At: 3600 (an hour from now), Id: water, Repeats: Daily.
#Good to know
- It needs Notifications. The first time, your app shows the reason you wrote under Data & Logic → Permissions, then iPadOS asks.
- At is a date, or a number of seconds from now. Left empty, it's 5 seconds.
- Daily and Weekly show it again at the time of day of At (and on its weekday, for Weekly).
- Scheduling one with an Id that's already scheduled replaces it. Cancel Notification takes it back.
- Notifications show even while PadCode is open, so you can see them in Preview.
- Tapping one opens your app, running: in PadCode from My Apps or Preview, and in PadLauncher on an iPhone. Notifications scheduled by an older version of PadCode or PadLauncher open the app itself instead.
#Add it
Select a view, open the Inspector's Actions tab, pick when it runs, tap Add action and choose Schedule Notification (under Device). Tap the step to open its settings.
#Settings
| Setting | What it does | Kind | Default |
|---|---|---|---|
| Title | The bold first line. | Text | Required |
| Body | The text under it. | Text | |
| At | When: a date, or a number of seconds from now. | Any value | Required |
| Id | A name, to cancel it later. Scheduling one with the same name replaces it. | Text | Optional |
| Repeats | Show it again every day or week, at the same time. | Choice: Never, Daily, Weekly | never |