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.
Documentation
https://developer.android.com/develop/ui/views/notifications
Integration
When using the React Native SDK, Live Activities can be managed in two different ways:
- TypeScript API (Capacitor layer) – Allows you to log in/out of Live Activities, retrieve enabled topics, subscribe/unsubscribe to them, and listen for push notifications directly from TypeScript.
- Native Android – Gives you full access to Live Activities APIs from native platform code. See the Native Android Integration guides for details.
- Both options are fully compatible and can be used independently or in combination, depending on your project’s requirements and development workflow.
Typescript API Reference
All methods return results asynchronously through callbacks.
Log In
Registers the device in Live Activities with an externalCode
provided by your backend.
LiveActivity.logIn(
"user_identifier",
(deviceData) => {
console.log("Successfully logged in:", deviceData);
},
(error) => {
console.error("Error logging in:", error);
}
);
Log Out
Unregisters the device from Live Activities.
LiveActivity.logOut(
(deviceData) => {
console.log("Successfully logged out:", deviceData);
},
(error) => {
console.error("Error logging out:", error);
}
);
Warning: 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.
List Subscribed Topics
Retrieves a list of topics to which the device is currently subscribed.
LiveActivity.topicList(
(topics) => {
console.log("Available topics:", topics);
},
(error) => {
console.error("Error retrieving topics:", error);
}
);
Subscribe to Topics
Adds the device to one or more topics.
LiveActivity.subscribeToTopic(
{ topic: "live_activity_topic" },
(topicData) => {
console.log("Subscribed to topic:", topicData);
},
(error) => {
console.error("Error subscribing to topic:", error);
}
);
Unsubscribe from Topics
Removes the device from one or more topics
LiveActivity.unsubscribeToTopic(
{ topic: "live_activity_topic" },
(topicData) => {
console.log("Unsubscribed from topic:", topicData);
},
(error) => {
console.error("Error unsubscribing from topic:", error);
}
);
Push Reception Callback
Registers a callback to handle incoming push notifications, including Live Activity events.
import { Indigitall } from 'indigitall-capacitor-plugin';
Indigitall.onMessageReceived(async (data) => {
console.log("Push received:", JSON.stringify(data));
Indigitall.isIndigitallPushNotification(
data,
async () => {
console.log("Push is from Indigitall");
// You can show alerts, update UI, etc.
// await Alert.showAlert('Push indigitall', 'True');
},
async (error) => {
console.error("Not an Indigitall push:", error);
// await Alert.showAlert('Not Indigitall push', error.message);
}
);
});
Typical Workflow in Ionic Capacitor
- 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.
Full Live Activities Workflow in Ionic Capacitor (TypeScript)
import { Indigitall, LiveActivity } from 'indigitall-capacitor-plugin';
// 1. Log in the device
LiveActivity.logIn(
"yourExternalCode",
(deviceData) => {
console.log("Device registered:", deviceData);
// 2. Subscribe to desired topics
const topicsToSubscribe = ["order_123", "match_live"];
LiveActivity.topicsSubscribe(
topicsToSubscribe,
(topics) => {
console.log("Subscribed to topics:", topics);
},
(error) => {
console.error("Subscribe error:", error);
}
);
},
(error) => {
console.error("Login error:", error);
}
);
// ⚠️ Warning: These topics are NOT the same topics used for the push notification service.
// 3. Listen for push notifications
Indigitall.onMessageReceived(async (data) => {
console.log("Push received:", JSON.stringify(data));
if (data.pushType === "LIVE_ACTIVITY") {
if (data.liveActivityEventType === "START") {
console.log("Live Activity started:", data);
} else if (data.liveActivityEventType === "UPDATE") {
console.log("Live Activity updated:", data);
} else if (data.liveActivityEventType === "END") {
console.log("Live Activity ended:", data);
}
}
Indigitall.isIndigitallPushNotification(
data,
async () => {
console.log("Push is from Indigitall");
// Aquí puedes mostrar alertas, actualizar UI, etc.
},
async (error) => {
console.error("Not an Indigitall push:", error);
// Aquí puedes mostrar alertas de error, etc.
}
);
});