Skip to content

Local Notifications

You'll schedule reminders that arrive while the app is closed, ask for the permission at a sensible moment, and make a tap on the notification open the right screen.

About

A notification is your app talking when it isn't open, which makes it the easiest thing to get wrong and the fastest way to get deleted. Local notifications need no server and no push certificates, so they're the place to learn. iOS has always asked for permission and Android has since 13, and both let the user switch you off in one tap. The rule is simple: a notification is something the person asked for, at the time they asked for it, and tapping it lands them on the thing. Build a reminder app, or add reminders to your list app.

At a glance

Per requirement
25 XP
Completion bonus
150 XP
Requirements
6
Takes
One weekend, then a week of use
Skill level
Intermediate (months of practice)
Cost
Free
Supplies
Nothing special
Where
At home
Other people
On your own
Locked for now
Earn two more Common badges in Mobile Apps to open this one. Log in to see how far along you are.

Requirements

  1. 1
    Ask for the notification permission after the first reminder is set, not at launch. Show one sentence of your own before the system prompt, and delete and reinstall so the prompt is fresh. Film the path from setting a reminder to the system prompt. Video
  2. 2
    Schedule a reminder and receive it with the app closed and the phone locked. Set one for two minutes ahead, swipe the app away, and lock the phone. On Android, exact alarms need a special permission from 12 and are denied by default from 14, so use an inexact one and expect a few minutes of slop. Film the lock screen when it arrives. Video
  3. 3
    Make a tap on the notification open the matching item. Carry an id in the notification's payload and navigate to it on launch, which means handling the case where the app was cold. Film the tap landing on the right screen. Video
  4. 4
    Show the pending reminders and let the person cancel one. Ask the system for its pending list where it has one (iOS does, and so does the Flutter plugin). Plain Android won't tell you what alarms are set, so keep one record of your own and cancel through it, because two records drift. Film cancelling one and the time passing with nothing arriving. Video
  5. 5
    Add quiet hours and respect them. Nothing fires between the hours the person sets, and anything due in that window moves to the morning. Set one for inside quiet hours and take a photo of the lock screen when it arrives in the morning, with the time it was set for in your post. Photo
  6. 6
    Use it for a week and cut whatever you dismissed without reading. Keep a tally of notifications you swiped away unread. Each one is a notification that shouldn't have been sent. Take a photo of the tally and tell us what you changed. Photo