RORK LABJP
CLOUD — Rork Max compiles native Swift on a fleet of cloud Macs, so you never download Xcode or need to own a MacPLATFORM — Rork Max targets iPhone, iPad, Apple Watch, and Vision Pro, and reaches games, widgets, and Live ActivitiesSHIP — Build in the browser, preview through a streaming simulator, install on device via QR code, and submit to the App Store without leaving RorkSPLIT — Regular Rork generates cross-platform apps with React Native and Expo. Reach for it to ship broadly and fast, and for Max when you need Apple-specific depthCREDIT — The free tier works out to roughly five prompts a week. It helps to budget the cost of trying something separately from the cost of finishing itPRICE — Rork Max sits on the $200/month Max plan, while regular Rork starts free with paid plans from $25/monthCLOUD — Rork Max compiles native Swift on a fleet of cloud Macs, so you never download Xcode or need to own a MacPLATFORM — Rork Max targets iPhone, iPad, Apple Watch, and Vision Pro, and reaches games, widgets, and Live ActivitiesSHIP — Build in the browser, preview through a streaming simulator, install on device via QR code, and submit to the App Store without leaving RorkSPLIT — Regular Rork generates cross-platform apps with React Native and Expo. Reach for it to ship broadly and fast, and for Max when you need Apple-specific depthCREDIT — The free tier works out to roughly five prompts a week. It helps to budget the cost of trying something separately from the cost of finishing itPRICE — Rork Max sits on the $200/month Max plan, while regular Rork starts free with paid plans from $25/month
Articles/Dev Tools
Dev Tools/2026-06-16Intermediate

Notifications You Can Finish Without Opening the App — Interactive Notification Actions for Rork Apps

Those buttons and text fields that appear when you long-press a notification. Here is how to implement interactive notification actions in a Rork-built Expo app for an experience that completes without launching, including the background-execution pitfalls.

Rork525Notifications3Expo156Notification ActionsUX Design9React Native218

Premium Article

When I started sending a "word for today" notification in a wellness app, something occurred to me. The user taps the notification, opens the app, reads the message, and closes it again. They were launching the entire app for nothing more than that. If it's just to read, wouldn't it be kinder to let it complete inside the notification itself? That thought is what led me to interactive notification actions.

Interactive notification actions are the buttons and text-input fields that appear when you long-press (or swipe down on) a notification. It's the mechanism behind a "Done / Later" button on a reminder, or a reply field on a message. Because the user can finish the action right there without opening the app, the number of steps drops dramatically.

Rork tends to generate the basic code for sending and receiving notifications, but often not the action definitions or background handling. Here is the design for adding this to an Expo (React Native) app, drawn from my experience as an indie developer shipping apps on the App Store and Google Play.

Define actions grouped into "categories"

Notification actions aren't defined as loose individual buttons; they're grouped into a unit called a "category." For example, you bundle "Done" and "Remind in 1 hour" into a "reminder" category, then specify that category when you send the notification.

In Expo you define them with setNotificationCategoryAsync from expo-notifications.

// notificationCategories.ts — register once at app launch
import * as Notifications from "expo-notifications";
 
export async function registerCategories() {
  await Notifications.setNotificationCategoryAsync("reminder", [
    {
      identifier: "complete",
      buttonTitle: "Done",
      options: { opensAppToForeground: false }, // handle in background, no launch
    },
    {
      identifier: "snooze",
      buttonTitle: "Remind in 1 hour",
      options: { opensAppToForeground: false },
    },
  ]);
 
  await Notifications.setNotificationCategoryAsync("daily_word", [
    {
      identifier: "reply",
      buttonTitle: "Write a reflection",
      textInput: {
        submitButtonTitle: "Send",
        placeholder: "A word about how you feel…",
      },
      options: { opensAppToForeground: true }, // save in-app after input
    },
  ]);
}

The value of opensAppToForeground is the crux of this design. Set it to false and the work runs without bringing the app to the front; set it to true and the app opens after the action. The basic split: false for instant work like a "Done" button, true for work like text input that you'll want to show a screen for afterward.

On the sending side, specify the matching category ID in categoryIdentifier.

await Notifications.scheduleNotificationAsync({
  content: {
    title: "Time to water",
    body: "Give your houseplant a drink",
    categoryIdentifier: "reminder", // the category defined above
  },
  trigger: { hour: 9, minute: 0, repeats: true },
});

Receive the action and branch the handling

The result of a button press arrives via addNotificationResponseReceivedListener. Which action was pressed is in actionIdentifier, and the text-input contents are in userText.

// notificationHandler.ts
import * as Notifications from "expo-notifications";
 
export function listenForActions() {
  return Notifications.addNotificationResponseReceivedListener(async (res) => {
    const action = res.actionIdentifier;
    const data = res.notification.request.content.data;
 
    if (action === "complete") {
      await markReminderDone(data.reminderId);
    } else if (action === "snooze") {
      await Notifications.scheduleNotificationAsync({
        content: { title: "Reminder", body: data.body, categoryIdentifier: "reminder" },
        trigger: { seconds: 3600 },
      });
    } else if (action === "reply") {
      await saveReflection(res.userText ?? ""); // text input arrives in userText
    }
  });
}

Watch out: actionIdentifier also carries OS-reserved special values. A plain tap on the notification body delivers Notifications.DEFAULT_ACTION_IDENTIFIER. If you forget to branch — handling only your own actions and routing the default tap to normal navigation — body taps go unresponsive. I shipped exactly that bug once: "tapping the notification normally does nothing."

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Defining button and text-input actions grouped by category
Handling the OS execution-time limit when completing work in the background without launching
The action-design criteria that kept my notification opt-in rate from dropping — with measured results
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Dev Tools2026-07-07
The App Icon Badge Still Says 3 — Rebuilding Expo Badge Counts Around a Single Source of Truth
Why an Expo app's icon badge drifts out of sync with real unread counts and refuses to clear — and how to rebuild it around a single source of truth, with working recompute-and-sync code and the production pitfalls that bite you.
Dev Tools2026-06-22
Build a Toast System in Your Rork App That Survives Overlaps, Screen Readers, and Notches
When you add toast notifications to a React Native app generated by Rork, the naive version breaks in three places: two toasts overlap, screen readers stay silent, and the text hides under the notch or home indicator. This walks through a root-level queue, animations decoupled from your app tree, AccessibilityInfo announcements, and safe-area placement — all in working code.
Dev Tools2026-07-30
What Renovate may bump in an Expo app, and what it must never touch
Turning on automated dependency updates in a Rork-generated app also hands Renovate the 123 packages Expo SDK 57 pins. Measured on 2026-07-30, six of them sit a full major version behind npm latest. Here is how to generate the ignore list from the SDK instead of maintaining it by hand.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →