Overview

Live Activities allow your app to display real-time, glanceable updates on the Lock Screen and Dynamic Island (on supported iPhone models). This feature helps users stay informed about ongoing events—such as delivery progress, timers, or scores—without needing to open the app.
Our SDK simplifies the integration of Live Activities by managing setup, lifecycle management, and updates. With just a few lines of code, you can start, update, and end activities seamlessly.
Use cases include tracking orders, workouts, media playback, or any live process. Live Activities enhance user engagement by keeping key information always visible and up to date.
This functionality is available on iOS 16.1 and later.
Note: Starting with iOS 17, Live Activities have new behaviors and interaction capabilities, including support for standby mode and enhanced Dynamic Island experiences.
Limitations
- Currently, bulk delivery is supported only on devices running iOS 18 or later.
- A maximum of 10 iOSClass entries can be created.
- Up to 5 Live Activities can be active (on the Lock Screen) per device and application.
- Each application can have up to 10,000 active channels.
Integration
This guide explains how to work with Live Activities using our SDK, from retrieving active activities to managing push tokens.
Get Active Live Activities
To retrieve a list of currently active Live Activities associated with the device:
var mindigitall = new MIndigitall();
mindigitall.GetListLiveActivities(
onSuccess: (liveActivities) =>
{
foreach (var activity in liveActivities)
{
Console.WriteLine($"ID: {activity.LiveActivityId}, ExternalId: {activity.LiveActivityExternalId}");
}
},
onError: (errorCode, errorMessage) =>
{
Console.WriteLine($"Error obteniendo Live Activities: {errorMessage} (Código: {errorCode})");
}
);
Register Device Information
Send the list of Live Activities the device is subscribed to so the backend can associate them with the device for push updates:
var activities = new INDMLiveActivity[]
{
new INDMLiveActivity
{
LiveActivityExternalId = "order_123",
iOSChannelId = "TimerWidgetAttributes"
}
};
mindigitall.SubscribeToLiveActivities(
liveActivities: activities,
onSuccess: () =>
{
Console.WriteLine("Live Activities registradas correctamente.");
},
onError: (errorCode, errorMessage) =>
{
Console.WriteLine($"Error al suscribir Live Activities: {errorMessage}");
}
);
Request and Register Push Token (PushToStart)
To receive push notifications for Live Activities, you need to listen for token updates and register them.
This example uses a custom TimerWidgetAttributes type:
string pushToStartToken = "hexadecimal_push_to_start_token";
string iosAttributesType = "TimerWidgetAttributes";
mindigitall.SetPushToStartTokenUpdates(
token: pushToStartToken,
iosAttributesType: iosAttributesType,
onSuccess: () =>
{
Console.WriteLine("PushToStart token enviado correctamente.");
},
onError: (errorCode, errorMessage) =>
{
Console.WriteLine($"Error enviando PushToStart token: {errorMessage}");
}
);
This token should be sent to your backend notification server so it can target the correct Live Activity.
Monitor Token Updates (Advanced – Rarely Needed)
In most cases, tokens won't change during the activity's lifecycle. However, you can monitor token updates with:
string pushToken = "hexadecimal_push_token";
string liveActivityExternalId = "order_123";
mindigitall.SetPushTokenUpdates(
token: pushToken,
liveActivityExternalId: liveActivityExternalId,
onSuccess: () =>
{
Console.WriteLine("Push token actualizado correctamente.");
},
onError: (errorCode, errorMessage) =>
{
Console.WriteLine($"Error actualizando push token: {errorMessage}");
}
);
Typically, this isn’t necessary if you’re sending push notifications via a known channelId, since tokens are expected to remain stable.
// Dentro de tu receptor de notificaciones en MAUI
void OnPushReceived(Dictionary<string, object> data)
{
Console.WriteLine($"Push recibido: {System.Text.Json.JsonSerializer.Serialize(data)}");
if (data.TryGetValue("pushType", out var pushType) && pushType.ToString() == "LIVE_ACTIVITY")
{
if (data.TryGetValue("liveActivityEventType", out var eventType))
{
switch (eventType.ToString())
{
case "START":
Console.WriteLine("Live Activity iniciada.");
break;
case "UPDATE":
Console.WriteLine("Live Activity actualizada.");
break;
case "END":
Console.WriteLine("Live Activity finalizada.");
break;
}
}
}
}