Skip to content
Skip to content
Goodspeed

Build apps with Expo Notifications

Expo Notifications is the native SDK used in lib/notifications.ts to request permissions, create Android channels, and register push tokens. Goodspeed generates Expo Notifications as a standard part of every app, so the output is a working codebase from day one, not a scaffold you have to finish yourself.

WHAT GETS GENERATED

Built into every Expo Notifications build

Every app Goodspeed generates with Expo Notifications includes these production-ready patterns, wired together from the first build.

ItemDescriptionStrength
Permission request flowrequestPermissionsAsync runs on first app launch for authenticated users. The result gates token registration so users who deny never have a token upserted.Setup
Android notification channelssetNotificationChannelAsync creates a channel for each entry in gasConfig.features.pushNotifications.channels at app start, giving users channel-level control in Android settings.Android
getExpoPushTokenAsync token fetchThe Expo push token is fetched from the Expo Push Service and upserted to the Supabase push_tokens table with the user ID and platform.Token
setNotificationHandler global configA module-level handler configures shouldShowAlert, shouldPlaySound, and shouldSetBadge for all received notifications, consistent across the app.Handler
Simulator guard via expo-deviceexpo-device.isDevice is checked before requesting a push token. Simulators do not have push tokens and the check prevents a confusing failure in dev.Dev Experience

Source: gas-template repository · Push Notifications SDK

REAL GENERATED CODE

A snippet from a Expo Notifications app the studio shipped

This pattern comes directly from the gas-template codebase, the foundation every Goodspeed app is generated on. The studio generates Expo Notifications code like this for every app in the pipeline, not just a hello-world scaffold.

  1. Channel setup

    // lib/notifications.ts: Android channel creation
    if (Platform.OS === 'android' && ExpoNotifications) {
      for (const channel of gasConfig.features.pushNotifications.channels) {
        await ExpoNotifications.setNotificationChannelAsync(channel.id, {
          name: channel.name,
          importance: ExpoNotifications.AndroidImportance.MAX,
          vibrationPattern: [0, 250, 250, 250],
          lightColor: gasConfig.design.colors.primary,
        });
      }
    }
GDaily Allergens

Today's log

Gluten
Tree nuts
Shellfish
Dairy
HomeScanLogProfile

START WITH EXPO NOTIFICATIONS

Your Expo Notifications app, generated