BowlerKitBowlerKit
Features

Notifications

10/11/2026

Notification listeners, Account push-token registration, and profile-specific notification behavior.

What the template currently provides

hooks/use-push-notifications.ts configures the Expo notification foreground handler and registers listeners for received notifications and notification responses. The response listener currently logs the tapped notification; it does not route to a notification-specific screen.

The template also includes an Account notification center backed by React Query:

  • GET /api/v1/app/notifications
  • PUT /api/v1/app/notifications/{id}/read
  • PUT /api/v1/app/notifications/read-all
  • DELETE /api/v1/app/notifications/{id}
  • DELETE /api/v1/app/notifications
  • GET/PUT /api/v1/app/notifications/preferences

The notification list query is enabled only for an authenticated Account user.

Account push registration

hooks/use-push-token.ts is Account-only. On a physical device it:

  1. Creates the Android notification channel.
  2. Requests notification permission.
  3. Reads the native device/FCM token with getDevicePushTokenAsync().
  4. Stores it locally and posts it to POST /api/v1/app/device-tokens after the current user is restored.

Remote delivery therefore requires Firebase configuration, native credentials, and the Laravel admin panel's Firebase server credential. The template is not using Expo's hosted push-token service for this path.

Guest behavior

Guest mode never requests or syncs a device/FCM token. Notification preferences are local-only, and account notification queries are disabled. The shared notification handler/listener remains in the source so the runtime can receive local notifications, but the template does not provide a complete local scheduling API. Add and test a scheduling path if your Guest app needs scheduled reminders.

Required native setup

Before a native build, add the Firebase files expected by app.config.ts:

  • google-services.json for Android.
  • GoogleService-Info.plist for iOS.

Also configure the EAS project ID and notification permissions for the target platforms. Test on a physical device; simulators cannot produce a real device push token.

Relevant files

  • hooks/use-push-notifications.ts
  • hooks/use-push-token.ts
  • queries/use-notifications.ts
  • mutations/use-notification-mutations.ts
  • store/preferences-store.ts
  • app/notifications.tsx and app/settings/notifications.tsx