A Live Activity is a way to present real-time information directly on the user’s screen without requiring them to open the app.
Its purpose is to keep the user informed about an ongoing event or process, updating the data dynamically and making it easily accessible at a glance.
- A typical Live Activity lifecycle:
- Start – Created when an event begins that the user wants to track in real time (for example, an order in progress, a game score, or a countdown to an event).
- Update – Throughout its lifespan, it receives periodic updates with the latest information, keeping the interface always up to date.
- End – Closes automatically or manually when the event finishes or is no longer relevant.
Using Live Activities enhances the user experience by:
Providing instant, up-to-date information.
Reducing the need to repeatedly open the app.
Allowing smooth and continuous tracking of important events.
In short, a Live Activity is a direct and persistent channel between your app and the user, delivering live, relevant information at the right moment.
Models
- LADevice
class LADevice {
/// String field name enable
static const String _MAP_ENABLE = "enable";
/// String field name device id
static const String _MAP_DEVICE_ID = "deviceId";
/// String field name push token
static const String _MAP_PUSH_TOKEN = "pushToken";
/// String field name platform
static const String _MAP_PLATFORM = "platform";
/// String field name version
static const String _MAP_VERSION = "version";
/// String field name product name
static const String _MAP_PRODUCT_NAME = "productName";
/// String field name product version
static const String _MAP_PRODUCT_VERSION = "productVersion";
/// String field name os name
static const String _MAP_OS_NAME = "osName";
/// String field name os version
static const String _MAP_OS_VERSION = "osVersion";
/// String field name device brand
static const String _MAP_DEVICE_BRAND = "deviceBrand";
/// String field name device model
static const String _MAP_DEVICE_MODEL = "deviceModel";
/// String field name operator
static const String _MAP_OPERATOR = "operator";
/// String field name device type
static const String _MAP_DEVICE_TYPE = "deviceType";
/// String field name app version
static const String _MAP_APP_VERSION = "appVersion";
/// String field name locale
static const String _MAP_LOCALE = "locale";
/// String field name time zone
static const String _MAP_TIME_ZONE = "timeZone";
/// String field name time offset
static const String _MAP_TIME_OFFSET = "timeOffset";
/// String field name external apps
static const String _MAP_EXTERNAL_APPS = "externalApps";
/// String field name external code
static const String _MAP_EXTERNAL_CODE = "externalCode";
- LiveActivity
class LiveActivity {
/// Unique identifier of the Live Activity
String? id;
/// Application ID associated with the Live Activity
String? applicationId;
/// External ID for the Live Activity (optional, can be used for tracking)
String? liveActivityExternalId;
/// Status of the Live Activity (e.g., active, ended)
String? status;
/// Timestamp string when the Live Activity was created
String? createdAt;
/// Timestamp string when the Live Activity was last updated
String? updatedAt;
/// iOS channel ID associated with the Live Activity (optional)
String? iosChannelId;
/// Android topic ID associated with the Live Activity (optional)
String? androidTopicId;
