How It Works
Push notifications are automatically enabled when you install the Happy mobile app. The system uses Expo’s push notification service to deliver real-time alerts to your device.Notification Flow
Technical Implementation
Token Registration
When the mobile app starts, it automatically registers for push notifications:Server API
The Happy server provides REST endpoints for managing push tokens:Register Push Token
Delete Push Token
Get All Push Tokens
Database Schema
Push tokens are stored in the database with user association:Notification Types
Happy sends notifications for various events:Permission Requests
Claude Code needs approval to execute tools or access files
Error Alerts
Your AI coding session encountered an error
Task Completion
Claude Code finished a long-running task
User Input Required
Claude is waiting for your response
Permission Management
Happy requests notification permissions on first launch:iOS
- One-time permission prompt
- Can be managed in iOS Settings → Notifications → Happy
- Supports notification grouping and custom sounds
Android
- Notification channels for different alert types
- Granular control per notification category
- Android 13+ requires explicit permission grant
Permission States
In development mode (
__DEV__), push notifications are disabled to avoid unnecessary API calls during testing.Automatic Token Refresh
The app automatically refreshes push tokens when:- App returns to foreground
- User logs in or restores account
- Token expires or becomes invalid
Expo Push Notification Service
Happy uses Expo’s push notification infrastructure:- Cross-platform: Works on both iOS and Android
- Reliable delivery: High success rate with automatic retries
- Free tier: Included with Expo
- FCM/APNs integration: Uses Firebase Cloud Messaging and Apple Push Notification service
Token Format
Expo push tokens follow this format:Privacy & Security
Push notifications are designed with privacy in mind:Troubleshooting
Not Receiving Notifications?
Check notification permissions
Check notification permissions
Verify that Happy has notification permissions in your device settings.iOS: Settings → Notifications → Happy
Android: Settings → Apps → Happy → Notifications
Android: Settings → Apps → Happy → Notifications
Verify token registration
Verify token registration
The app should automatically register on launch. If issues persist, try logging out and back in.
Network connectivity
Network connectivity
Ensure your device has an active internet connection. Push notifications require connectivity to Expo’s push service.
Development mode
Development mode
Push notifications are disabled in development builds (
__DEV__). Use a production build to test notifications.Platform-Specific Issues
- iOS
- Android
- Notifications may be delayed if Low Power Mode is enabled
- Silent notifications require proper background mode configuration
- APNs requires proper provisioning profiles
Configuration
Push notifications work out of the box with default settings. For advanced configuration:Next Steps
Mobile Access
Learn about the mobile apps for iOS and Android
Device Switching
Switch control between desktop and mobile
Server Component
Explore the server architecture and API