live_updates 0.1.2
live_updates: ^0.1.2 copied to clipboard
iOS Live Activities and Android Live Update notifications with one Dart API. Built on FFIgen and JNIgen, no platform channels.
0.1.2 #
- Docs: README adds a Platform limits section (Live Activity duration, 4 KB size limit, Lock Screen height, user settings, number of activities, push budget and frequent updates, where Live Activities appear; Android promotion criteria, user settings, status bar chip, notification permission), each with a link to the official documentation.
- Docs: in the buttons table, an
opensApppress opens the app only when it is in the background. - Docs: removed the unsourced guideline to keep metric labels to 10 characters.
- Package topics:
dynamic-islandreplaceswidget.
0.1.1 #
- Android: in a regular notification (
AndroidLiveUpdateMode.classic, and Android 15 and earlier) with a body, the steps, journey and metrics text is a second line of the expanded notification instead of being cut off in the header. - Docs: screenshots of each layout on iOS and Android. In tests on iOS 27 (device and simulator) the default Lock Screen card was black in Light and Dark Mode; 0.1.0 said white in Light Mode, as Apple's guidelines describe for Light Mode (which other versions or setups may still show).
- Docs: README reorganized (shorter getting started, a table of where button
presses go, one Upgrading section) and the first usage example fixed;
accuracy fixes (Android 17 metrics in
classic, imports in examples).
0.1.0 #
Breaking changes (from now on they come only with a new minor version):
AndroidMetricis renamed toLiveUpdateMetric(AndroidMetricKindtoLiveUpdateMetricKind), andmetrics/criticalMetricmove fromAndroidLiveUpdateOptionstoLiveUpdateContent. The content-state keys are unchanged.AndroidLiveUpdateOptions.requestPromotionis replaced bymode(AndroidLiveUpdateMode.liveUpdate,ongoing,classic).requestPromotion: falsebecomesmode: AndroidLiveUpdateMode.ongoing;classicshows the same notification as Android 15 and earlier on every version. Remote payloads withrequestPromotion: falsestill work.- Button presses reach the app's Dart listeners only while the app is in the
foreground; otherwise the background handler runs them, so the system
keeps the app alive for them.
LiveUpdates.onActiontakes every press,LiveUpdate.actionsonly that update's; other presses stay queued and run the background handler, also while the app is open. An open-app press that no listener takes within 5 seconds runs the background handler. - Platform interface:
LiveUpdatesPlatform.actionsis nowactions({String? updateId}).
New:
- Layouts:
IosLiveUpdateOptions.layout(IosLiveUpdateLayout.standard,timer,metrics,stepper,journey, orcustom('name')for a layout of your own) chooses the Lock Screen and expanded Dynamic Island pattern of the generated widget. New shared dataLiveUpdateContent.steps(LiveUpdateSteps) andjourney(LiveUpdateJourney). Android uses the same data: steps become progress segments and points on Android 16+, and steps, journey and number and text metrics are added to the notification text where the system does not show them otherwise. IosLiveUpdateOptions.color,backgroundColorandforegroundColor: accent, Lock Screen background and text of the generated widget (content-state keystintArgb/backgroundArgb/foregroundArgb); the Always-On display uses system colors.- Run
dart run live_updates:create_widgetafter updating to refreshLiveUpdatesViews.swift,LiveUpdatesAttributes.swiftandLiveUpdatesActionIntent.swift; the generated layout file now switches oncontext.state.layoutfor custom layouts (add the switch to an older layout file, or regenerate it with--force).
Fixes:
- Background handler: a press that arrives as a run finishes is run; a handler that can no longer be found drops the queued presses instead of starting engines repeatedly.
- Taps and lifecycle events reach every engine that listens (a background engine no longer takes them from the app), and listeners of a destroyed engine are dropped.
- Android: a tap no longer passes the plugin's internal URI to Flutter as a
deep link; an update removed by
timeoutAfteris not treated as dismissed by the user (it reportsended, and its key can be started again); a remote or localendnever brings back a dismissed update, and a remoteendkeeps final content whenlive_updates_dismiss_afteris missing; concurrentrequestPermissioncalls all complete;updateno longer throws when the user turned the channel off; reopening from Recents does not deliver a tap again. - iOS: a tap that launches an app without scenes is delivered once; taps
keep working when the background handler started first;
active()leaves out ended activities,updateon an ended one throws,startOrUpdateprefers the running activity with the key, andstatesreportsdismissedafterended. - A non-finite
progressis left out instead of breaking the content. - Network images: redirects must stay on https; image files are written
atomically;
maxDimensionmust be positive. create_widgetreports a missing option value.
0.0.6 #
- Docs: clearer platform table (Live Activity push tokens, buttons, images,
remote updates, broadcasts), requirements,
end(dismissAfter:)on Android, and complete push-to-start keys.
0.0.5 #
LiveUpdate.key: the key fromstartOrUpdate, a push-to-startattributes.key(iOS) or a remotelive_updates_id(Android), also on updates fromactive()andonStarted.- Docs: sending to both platforms through FCM (
docs/server-fcm.md). IosLiveUpdateOptions.compactTrailingandminimal(IosIslandContent): choose what the compact and minimal Dynamic Island show.create_widget: the reusable views move toLiveUpdatesViews.swift, whichcreate_widgetalways updates together withLiveUpdatesAttributes.swiftandLiveUpdatesActionIntent.swift. Your layout file is kept unless you pass--force. Existing layouts keep working; runcreate_widget --forceonce to switch to the shorter layout that uses the shared views (needed forcompactTrailing/minimal).LiveUpdatesActionIntent.swiftis now always replaced; a file without the generated header is kept as.bak.- Screenshots on pub.dev and in the README; the example app has its own icon.
0.0.4 #
LiveUpdateContent.timer: a countdown or stopwatch counted by the system (iOS widget template, Android chronometer). Re-runcreate_widget --forceto update the widget.- Android:
progressSegments,progressPointsandprogressTrackerIcon(Android 16+ProgressStyle),timeoutAfterandalert. - Docs: Android 17 does not show the body text of a Live Update with
metrics.
0.0.3 #
- iOS 18 broadcast:
start(..., iosChannelId:)andstartOrUpdate(..., iosChannelId:)subscribe a Live Activity to an APNs broadcast channel. tool/send_push.dart:apns-channel(create, list, delete) andapns-broadcastcommands;--input-push-channeland--activity-keyfor push-to-start.create_widget: per-configuration widget bundle ids and App Groups for flavors (LIVE_UPDATES_APP_GROUPbuild setting); offers to install the xcodeproj gem when it is missing; manual setup steps in the README.LiveUpdates.setBackgroundActionHandler: handle button presses while the app is not running in a headless Flutter engine (Android and iOS). Re-runcreate_widget --forceto updateLiveUpdatesActionIntent.swift.LiveUpdateAction.requiresUnlock: ask for an unlock before a Lock Screen press is handled (iOS, Android 12+).- Android 17:
AndroidLiveUpdateOptions.metrics(MetricStyle, withcriticalMetric) and semantic colors for the body, the progress bar and metrics (LiveUpdateSemanticStyle). - iOS 27: the generated widget leaves the title out of the compact Dynamic
Island view when it is limited in width (landscape). Re-run
create_widget --forceto update the widget. - Fix: an Android
channelIdoption no longer affects iOS push settings.
0.0.2 #
- Push tokens (
LiveUpdate.pushTokens,LiveUpdates.pushToStartTokens) replay the current token to new listeners. LiveUpdatePushToken.toString()no longer includes the token.
0.0.1 #
- Initial release.
- Start, update and end iOS Live Activities and Android Live Updates with one API.
- iOS: FFIgen bindings to an ActivityKit bridge, push-to-start and push token
streams,
create_widgetcommand generating a SwiftUI widget extension. - Android: JNIgen bindings; ongoing notifications with
ProgressStyleon Android 16+ and promotion to Live Updates where supported, progress bar fallback below; remote payloads;canPostPromotedNotifications(). - Tap routes, notification permission request, no-op on other platforms.
- Images (
LiveUpdateImage) shared with the iOS widget through an App Group and shown as the Android large icon. endAll(),onStartedandLiveUpdate.states.startOrUpdate(key, content)andfind(key)for app-chosen keys.- Buttons (
LiveUpdateAction) with background or open-app handling andonAction/LiveUpdate.actions.
