BLE Hubs 1.0Think SignalR for BLE!Think SignalR for BLE!Hub it up!
UniHub 1.0Universal Hubs - SignalR Styled Hub BLE or HTTP - Why not both!?Universal Hubs - SignalR Styled Hub BLE or HTTP - Why not both!?YES PLEASE!
Live Activities
The live activities bridge lets the page put an ongoing status on the device: a delivery, a timer, a score. On iOS
it’s a Live Activity on the Lock Screen and in the Dynamic Island. On Android 16 it’s a Live Update, a
promoted ongoing notification that also shows as a status bar chip. It’s built on
Shiny.Mobile.LiveActivities 5.9. The page decides what an activity says; the app’s
widget decides how it looks.
AddLiveActivitiesBridge() registers Shiny’s live activity service with the bridge’s delegate, so there’s nothing
else to call. Its optional argument is Shiny’s LiveActivityOptions, which names the Android notification channel
(o.ChannelName = "Deliveries"). An app that already called services.AddLiveActivities(…) keeps its registration,
and the bridge only adds its delegate.
iOS needs the widget extension. ActivityKit draws an activity from a SwiftUI widget in the app bundle. Turn on
Shiny’s, and the iOS build compiles it into the app and adds NSSupportsLiveActivities to Info.plist:
Without it, starting an activity succeeds and nothing appears. The stock widget shows the title, body, short status
and progress. To draw your own, see the iOS widget extension. On a device build the
extension (<bundle id>.LiveActivity) needs a provisioning profile, which a wildcard development profile covers.
Every route, its body and its response is listed under Requests.
Content is title, body, shortStatus (a few characters, for the compact Dynamic Island and the Android
status bar chip), progress ({ value } from 0 to 1, { start, end } for a timer the system advances itself,
or { indeterminate: true }), staleDate, relevanceScore and data, strings for your own widget to read.
Attributes never change for the activity’s lifetime. kind picks a layout when your widget has several.
Errors:501 not_supported, 404 for an id that isn’t running, 400 for a body without content or a
progress value outside 0–1, and 502 live_activity_failed when the system refuses — the user switched live
activities off, or the app has too many running.
A server can update an activity, or start one with the app closed, through APNs. It needs the tokens iOS issues: one
per activity (when requestPushToken is true, the default) and one push-to-start token per device (iOS 17.2+).
A push token needs the aps-environment entitlement. Without it, iOS refuses to start an activity that asks for a
token, and the bridge answers 502 live_activity_failed (ActivityKit says only “ActivityInput error 0”). An app that
doesn’t use push starts its activities with requestPushToken: false.
They arrive as events and handler calls. A handler runs in the page if one is listening, and otherwise in
background.js, so a token issued with no page open still reaches your server.
Asks for the permission live activities need — notification permission on Android. iOS has no prompt, so it reports the Live Activities switch in Settings.
Starts an activity. Fails with 502 (live_activity_failed) when the system refuses it — the user switched live activities off, or the app has too many running.
What never changes for its lifetime — an order number, the teams. A push-to-start payload names the same attributes.
kind
string | null
Which layout renders it, for an app whose widget has more than one.
requestPushToken
boolean
Ask for a push token so a server can update it; it arrives as liveactivities.token. On iOS the app needs the aps-environment entitlement for this, or the start fails.
The system issued or rotated the push token for one activity (iOS). Send it to your server: it is the only way to update that activity remotely. Also handed to a liveactivities.token handler, so background.js can send it when no page is open.
The device's push-to-start token appeared or rotated (iOS 17.2+). A server uses it to start an activity while the app is not running. Also handed to a liveactivities.starttoken handler.
What never changes for its lifetime — an order number, the teams. A push-to-start payload names the same attributes.
kind?
string | null
Which layout renders it, for an app whose widget has more than one.
requestPushToken?
boolean
Ask for a push token so a server can update it; it arrives as liveactivities.token. On iOS the app needs the aps-environment entitlement for this, or the start fails.
The live activities routes sit under AppDeviceBridgePolicies.Bridges like every other bridge: callers on this device
by default. This bridge doesn’t change the default policy, the host-name check or the launch session. See
Security.