Radical
Reference

Notifications API

Local reminders, native push, topic state, badges, and tap navigation.

internalPlugins.notifications enables local notifications, badges, and network. internalPlugins.pushNotifications also enables Firebase messaging and topic storage. Dependencies are @capacitor/local-notifications@8.3.1, @capawesome/capacitor-badge@8.0.4, @capacitor/network@8.0.1, and, for push, @capacitor-firebase/messaging@8.5.2.

Client operations

ExportInputSuccess value
checkNotificationPermissionEffect value"granted", "denied", or "prompt"
requestNotificationPermissionEffect valueSame permission union
checkExactAlarmPermissionEffect value"granted", "denied", or "not-required"
requestExactAlarmPermissionEffect valueSame exact-alarm union
scheduleNotification(notification)LocalNotificationNotificationScheduleResult
cancelNotification(id)Notification IDVoid
registerPushEffect valueFCM token string
subscribeToTopic(topic)Topic stringVoid
unsubscribeFromTopic(topic)Topic stringVoid
getNotificationTopicsEffect valueConfirmed topic list on this installation
isSubscribedToTopic(topic)Topic stringBoolean
setNotificationBadge(count)Nonnegative integerVoid
clearNotificationBadgeEffect valueVoid, equivalent to count zero

Permission, scheduling, cancellation, and push registration depend on Bridge | BrowserNotifications. Topic and badge operations depend on Bridge. notificationsLive(effect) provides BrowserNotificationsLive. browserNotificationsLayer and BrowserNotifications support injected browser behavior.

Input schemas

LocalNotificationSchema has required id, title, and delaySeconds, plus optional body and route.

FieldConstraint
idInteger from 1 through 2147483647
titleNonempty string
bodyOptional string
delaySecondsFinite number greater than zero
routeOptional app-relative path starting with one /; no backslash, whitespace, or control characters

NotificationRouteSchema validates the route. TopicSchema accepts 1 to 900 characters matching letters, digits, _, ., ~, %, or -. The /topics/ prefix is not part of this input. NotificationPermissionSchema validates the permission union.

Native scheduling requests permission when it is prompt. A denied permission fails with PermissionDenied. Browsers schedule only while the page remains open. Native push and topics are unavailable in browsers. Topic lookup reports local confirmed state, not an FCM server query. Badges depend on native platform and launcher support.

Exact alarms and schedule results

ExactAlarmPermissionSchema validates "granted" | "denied" | "not-required". Display permission remains separate.

CapabilityAndroidiOSBrowser
Exact-alarm checkcheckExactNotificationSetting"not-required", no native call"not-required", no native call
Exact-alarm requestchangeExactNotificationSetting; Android 12+ opens Alarms & reminders settings and returns the setting on return"not-required""not-required"
Older Android"granted"; no special access requiredNot applicableNot applicable
Local remindersNative schedulingNative schedulingOnly while page stays open
Push and topicsFirebase messagingFirebase messagingUnavailable
BadgesLauncher-dependentPlatform supportUnavailable
Exact-alarm ruleBehavior
Declared permissionPlugin 8.3.1 declares SCHEDULE_EXACT_ALARM; merged by Android, unchanged by Radical
Android 12 and 13Granted at install; user can revoke
Android 14+Denied for most new installs targeting API 33+; exemptions and OS-upgrade grants may preserve access
Scheduling without accessCapacitor may open settings, then accept an inexact alarm if access remains denied
Later grantDoes not upgrade existing inexact alarms
RevocationAndroid cancels future exact alarms
USE_EXACT_ALARMDeclared by neither Radical nor the plugin; Play restricts it to qualifying core alarm and calendar cases
TimingNo permission value or missing warning guarantees delivery time
NotificationScheduleResultSchema fieldContract
notificationsArray of { id: number }
warningOptional { code: string, message: string }, type NotificationScheduleWarning
warning.code: "OS-PLUG-LNOT-0017"Android accepted an inexact alarm because exact access was missing
Other warning codesPreserved
Browser resultAccepted ID without warning

The result type is NotificationScheduleResult. Exact-alarm operations require Bridge; denial is a success value. Requesting access before scheduling avoids consuming the delay in settings.

Policy sources: Android permission changes, Android alarm behavior, and Play permission restrictions.

ContractValue
watchNotificationNavigation({ appId, push?, onError? })Scoped, long-lived Effect requiring Bridge, RadicalAdapter, NotificationSnapshots
pushDefaults to false
Tap handlingValidate route; try exact stored snapshot offline; otherwise adapter navigation
NotificationSnapshotsLiveBrowser cache and browser network service; still requires Bridge
restore(route, appId)Whether full-document restoration started
Browser eventradical-notification

Errors and React hooks

ErrorMeaning
PermissionDeniedNotification permission denied
UnavailableInvalid IDs, routes, topic names, badge counts, or out-of-range dates
MissingPushConfigurationMissing native Firebase setup; carries reason
BridgeCallFailedUnknown native failure
BridgeDecodeErrorMalformed result
Exact-alarm errorsSame typed bridge errors

useNotificationPermission() exposes check() and request(). useExactAlarmPermission() checks on mount and exposes check() and request(), with the exact-alarm union in value. useNotifications() exposes schedule, cancel, badge, push, and topic actions. Schedule actions retain NotificationScheduleResult in value, including warnings. Topic actions return the updated confirmed list in value.

Source: notification implementation.

On this page