A demonstration of Android 16's new Progress-Centric Notifications using Expo, React Native, and Firebase Cloud Messaging. This project showcases how to implement real-time, server-driven progress notifications for food delivery workflows.
Introduced in Android 16, progress-centric notifications are promoted Live Update notifications that provide users with seamless, glanceable tracking of start-to-end journeys like food delivery, ride-share, or long-running uploads.
- Prominent Display: Appears at the top of notification drawer, on lock screen, and as status chips in system bar
- Real-time Updates: Live progress tracking without constantly reopening the app
- Contextual Information: Rich status updates with progress indicators and critical text
- System Integration: Deep integration with Android's notification system
Orderly is a food delivery demo app that simulates the complete order lifecycle with live progress notifications. Users can place orders and receive real-time updates as their food progresses through different stages.
- INITIALIZING (0%) - Order received, kitchen preparation
- FOOD_PREPARATION (25%) - Cooking in progress
- FOOD_ENROUTE (50%) - Out for delivery
- FOOD_ARRIVING (75%) - Almost at your location
- ORDER_COMPLETE (100%) - Delivered and ready
- Native Android Implementation: Custom Kotlin module for Android 16 progress-centric notifications
- React Native Interface: TypeScript module providing clean APIs for notification management
- Key Methods:
start()- Initialize progress notificationupdate()- Update progress, status, and contextual informationcancel()- Dismiss the notificationgetPermissionsAsync()/requestPermissionsAsync()- Permission management
- Server-side: Firebase Admin SDK for sending structured FCM messages
- Client-side: React Native Firebase for receiving and processing notifications
- Token Management: Automatic FCM token registration and refresh handling
- Order Management:
POST /api/order- Create new ordersGET /api/order/[id]- Fetch order detailsPATCH /api/order/[id]- Update order status
- FCM Token Registration:
POST /api/fcm/token- Register device tokens
- FCM Processing: Parse incoming Firebase messages and trigger native module updates
- Status Mapping: Convert order statuses to user-friendly notifications with progress indicators
- Expo SDK 54 with React Native 0.81.1
- Expo Router for file-based routing and API routes
- React Native Firebase for FCM integration
- Firebase Admin SDK for server-side messaging
- Expo API Routes for local server endpoints
- In-memory storage for demo purposes (orders and FCM tokens)
- Expo Modules API for custom native module development
- Kotlin for Android native implementation
- Swift for iOS module structure (placeholder)
βββ app/ # Expo Router app directory
β βββ api/ # API routes
β β βββ fcm/token+api.ts # FCM token registration
β β βββ order/ # Order management endpoints
β βββ _layout.tsx # Root layout with FCM setup
β βββ index.tsx # Main checkout interface
βββ modules/ # Custom Expo modules
β βββ progress-centric-notifications/
β βββ android/ # Android native implementation
β βββ ios/ # iOS module structure
β βββ src/ # TypeScript module interface
β βββ expo-module.config.json
βββ firebase/ # Firebase configuration
β βββ index.ts # Admin SDK setup and messaging
βββ notifications/ # FCM handling
β βββ fcmHandler.ts # Message processing and parsing
βββ services/ # API service functions
βββ types/ # TypeScript type definitions
βββ utils/ # Utility functions for status mapping
βββ android/ # Android project files
- Android Studio Meerkat | 2024.3.1 (or later) - Required for Android 16 QPR2 preview support
- Android 16 QPR2 SDK with "Baklava" system image
- Firebase project with Cloud Messaging (FCM) enabled
- Android 16+ device or emulator for testing progress-centric notifications
Note: Android 16 QPR2 is currently in Beta. Follow the official setup guide to configure your development environment.
-
Clone and Install Dependencies
git clone https://github.com/akshayjadhav4/rn-progress-centric-notifications.git cd rn-progress-centric-notifications npm install -
Firebase Setup
- Create a Firebase project and enable Cloud Messaging
- Download
google-services.jsonand place in project root - Set up Firebase Admin SDK service account
- Add
FIREBASE_SERVICE_ACCOUNT_JSONenvironment variable
-
Android Permissions The app requires these permissions (already configured in
app.json):android.permission.POST_NOTIFICATIONSandroid.permission.POST_PROMOTED_NOTIFICATIONS
-
Set Up Android Project
npx expo prebuild --platform android --clean
-
Configure Android 16 QPR2 SDK
Update
android/app/build.gradleto use Android 16 QPR2 APIs:android { compileSdkPreview = "Baklava" defaultConfig { targetSdkPreview = "Baklava" } }
-
Run the Application
# Run on Android npm run android
Important: Make sure you have the Android 16 QPR2 "Baklava" system image installed in Android Studio's SDK Manager. See the official emulator setup guide for detailed instructions.
- Launch App: Open Orderly and view the checkout interface
- Place Order: Tap "Checkout" to create a new order
- Permission Request: Grant notification permissions if prompted
- Initial Notification: Watch as the first progress notification appears
- Manual Status Updates: Use the API endpoint to trigger status transitions and observe real-time progress updates
To test the complete order lifecycle, manually update the order status using the PATCH endpoint:
# Update to Food Preparation (25% progress)
curl --location --request PATCH 'http://localhost:8081/api/order/ord_tcs52t' \
--header 'Content-Type: application/json' \
--data '{
"status": "FOOD_PREPARATION"
}'
# Update to En Route (50% progress)
curl --location --request PATCH 'http://localhost:8081/api/order/ord_tcs52t' \
--header 'Content-Type: application/json' \
--data '{
"status": "FOOD_ENROUTE"
}'
# Update to Arriving (75% progress)
curl --location --request PATCH 'http://localhost:8081/api/order/ord_tcs52t' \
--header 'Content-Type: application/json' \
--data '{
"status": "FOOD_ARRIVING"
}'
# Complete the order (100% progress)
curl --location --request PATCH 'http://localhost:8081/api/order/ord_tcs52t' \
--header 'Content-Type: application/json' \
--data '{
"status": "ORDER_COMPLETE"
}'Note: Replace
ord_tcs52twith your actual order ID from the checkout response.
POST /api/order- Create order with itemsGET /api/order/[id]- Retrieve order detailsPATCH /api/order/[id]- Update order status
POST /api/fcm/token- Register device FCM token
ProgressCentricNotifications.start(title, message, criticalText?)ProgressCentricNotifications.update(title, message, status, estimatedTime, progress, criticalText?)ProgressCentricNotifications.cancel()ProgressCentricNotifications.getPermissionsAsync()ProgressCentricNotifications.requestPermissionsAsync()
Note: This project requires Android 16+ for full progress-centric notification functionality. On older Android versions, notifications will fall back to standard notification behavior.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |







