Overview
Unlike iOS, Android currently does not offer a native Live Activities system. However, similar behavior can be achieved using standard notifications, including persistent (ongoing) notifications and silent pushes.
With our SDK, you can start, update, and end a Live Activity-like experience on Android by sending push notifications that reflect the current state of an event (e.g., delivery progress, workout status, or timers). These notifications can remain fixed in the status bar, update dynamically, or disappear when the activity ends.
We support both:
- Visible notifications: Useful for ongoing user-facing events.
- Silent pushes: Ideal for background updates without interrupting the user.
This approach allows full flexibility:
You can control layout, content, priority, actions, or custom sounds—just like with any other Android notification.
Our SDK handles:
- Device registration
- Push reception (visible or silent)
- Dynamic notification management (create/update/cancel)
Live Activities on Android are powered entirely by push logic and custom notification handling—giving you full control and compatibility across Android versions.
Limitations
- Bulk message delivery is supported on devices running Android 5.0 (API 21) and above.
- Currently, Live Activities on Android are a custom implementation via the SDK, not a native feature like on iOS.
Live Activities on Android – Integration Options
With the Flutter SDK, Live Activities can be managed in two different ways:
- Flutter/Dart API (plugin layer) – Retrieve, subscribe, and manage Live Activities directly from Dart using the provided plugin methods.
- Native Android or iOS integration – Gives full access to platform-specific Live Activities APIs, including push token generation and updates.
- For native Android integration, follow the guide: Live Activities Android Native Integration
Flutter Plugin API Reference
All methods are asynchronous and accept optional onSuccess
and onError
callbacks.
Log In for Live Activities
final params = {
"userId": "12345",
"authToken": "abc123"
};
Indigitall.liveActivityLogIn(
params,
onSuccess: () {
print("Logged in successfully");
},
onError: (error) {
print("Login error: ${error.message}");
},
);
Log Out from Live Activities
Indigitall.liveActivityLogOut(
onSuccess: () {
print("Logged out successfully");
},
onError: (error) {
print("Logout error: ${error.message}");
},
);
The topics used for Live Activities are not the same as those used for the push notification service. Make sure to configure and subscribe to the correct topics so Live Activities work independently.
Get List of Live Activity Topics
Indigitall.liveActivityTopicsList(
onSuccess: (topics) {
print("Available topics: $topics");
},
onError: (error) {
print("Error fetching topics: ${error.message}");
},
);
Subscribe to Live Activity Topics
final params = {
"topicNames": ["sports", "news"]
};
Indigitall.liveActivityTopicsSubscribe(
params,
onSuccess: () {
print("Subscribed to topics successfully");
},
onError: (error) {
print("Subscription error: ${error.message}");
},
);
Unsubscribe from Live Activity Topics
final params = {
"topicNames": ["sports"]
};
Indigitall.liveActivityTopicsUnsubscribe(
params,
onSuccess: () {
print("Unsubscribed from topics successfully");
},
onError: (error) {
print("Unsubscription error: ${error.message}");
},
);
Push Reception Callback
Registers a callback to handle incoming push notifications, including Live Activity events.
Indigitall.onMessageReceived((pushData) {
print("Push received: $pushData");
// Parse pushData to handle START, UPDATE, or END of a Live Activity
});
Typical Workflow in Flutter
- Log in the device with an externalCode.
- Subscribe to the topics representing the Live Activities you want to track.
- Listen for push notifications via onMessageReceived and update your UI accordingly.
- Unsubscribe or log out when the Live Activity ends or the user session changes.
Example: Full Live Activities Workflow in Flutter
- Below is a complete example of how to:
- Log in the device to Live Activities.
- Subscribe to one or more topics.
- Listen for push notifications (START, UPDATE, END events).
- Unsubscribe and log out when needed.
// 1. Log in the device with an externalCode
Indigitall.liveActivityLogIn(
{"externalCode": "yourExternalCode"},
onSuccess: () {
print("Device registered successfully");
// 2. Subscribe to desired topics after login
Indigitall.liveActivityTopicsSubscribe(
{"topics": ["order_123", "match_live"]},
onSuccess: () {
print("Successfully subscribed");
},
onError: (error) {
print("Subscribe error: ${error.message}");
},
);
},
onError: (error) {
print("Login error: ${error.message}");
},
);
// 3. Listen for push notifications
Indigitall.onMessageReceived((pushData) {
print("Push received: $pushData");
if (pushData?["pushType"] == "LIVE_ACTIVITY") {
if (pushData?["liveActivityEventType"] == "START") {
print("Live Activity started: $pushData");
} else if (pushData?["liveActivityEventType"] == "UPDATE") {
print("Live Activity updated: $pushData");
} else if (pushData?["liveActivityEventType"] == "END") {
print("Live Activity ended: $pushData");
}
}
});
// 4. Optional: Unsubscribe from topics when the event ends
Indigitall.liveActivityTopicsUnsubscribe(
{"topics": ["order_123"]},
onSuccess: () {
print("Successfully unsubscribed");
},
onError: (error) {
print("Unsubscribe error: ${error.message}");
},
);
// 5. Optional: Log out the device when the user session changes
Indigitall.liveActivityLogOut(
onSuccess: () {
print("Device logged out successfully");
},
onError: (error) {
print("Logout error: ${error.message}");
},
);