@amisi-mobile-starter/notifications
@amisi-mobile-starter/notifications registers mock by default and lazily loads onesignal or expo when selected.
Initialize
options.appId. The Expo adapter ignores initialization options. The mobile root reads the selected adapter from amisiConfig.notifications, injects EXPO_PUBLIC_ONE_SIGNAL_APP_ID for OneSignal, then initializes and registers after authentication.
Hook API
useNotifications() does not require a provider. It returns:
NotificationPreferences has required push, emailDigest, and smsAlerts booleans. The current setNotificationPreferences implementation only logs the request; it does not persist or send preferences.
Runtime API
The non-hook equivalents arerequestNotificationPermission, getNotificationPermissionStatus, registerForPushNotifications, unregisterPushNotifications, and setNotificationPreferences.
Subscribe with:
PushToken.provider is onesignal | expo. Expo registration requires a physical device, granted permission, and Constants.expoConfig.extra.eas.projectId. The mock adapter returns { token: 'mock-push-token', provider: 'expo' }.