Skip to content

@capgo/capacitor-live-activities

Manage iOS Live Activities and Dynamic Island layouts from Capacitor with JSON-driven templates

@capgo/capacitor-live-activities manages ActivityKit Live Activities from Capacitor using a JSON layout DSL (lock screen, Dynamic Island, timers, images in a shared App Group). It does not implement Apple App Intents, Siri phrases, the Shortcuts app, Spotlight indexing, or a pending App Intent queue.

For widget Home Screen surfaces, SVG templates, or LiveActivityIntent buttons tied to a template event log, use @capgo/capacitor-widget-kit instead or alongside this plugin. For Siri phrases, Spotlight, and a pending App Intent queue in JavaScript, use @capgo/capacitor-app-intents.

See Siri, Shortcuts, and widgets for how Capgo plugins map to system integration features.

Start with areActivitiesSupported() and the other core methods listed below.

PlatformSupportNotes
iOSYesNative
AndroidYesNative
WebNoGuard with Capacitor.getPlatform()
Animated Live Activities demo showing lock screen and Dynamic Island updates from Capacitor
Live Activity and Dynamic Island updates
  • areActivitiesSupported - Check if Live Activities are supported on this device. Requires iOS 16.1+ and device support.
  • startActivity - Start a new Live Activity with the specified layout and data.
  • updateActivity - Update an existing Live Activity with new data.
  • endActivity - End a Live Activity.
MethodDescription
areActivitiesSupportedCheck if Live Activities are supported on this device. Requires iOS 16.1+ and device support.
startActivityStart a new Live Activity with the specified layout and data.
updateActivityUpdate an existing Live Activity with new data.
endActivityEnd a Live Activity.
getAllActivitiesGet all currently active Live Activities.
saveImageSave an image to the shared App Group container for use in Live Activities. Images must be saved to the shared container to be accessible from the widget extension.
removeImageRemove a saved image from the shared container.
listImagesList all saved images in the shared container.
cleanupImagesRemove all saved images from the shared container.
getPluginVersionGet the native Capacitor plugin version.
startTimerSequenceStart a timer sequence for workouts/sports. On iOS: Shows in Live Activity and Dynamic Island On Android: Shows as a foreground notification with timer.
pauseTimerSequencePause the timer sequence.
resumeTimerSequenceResume a paused timer sequence.
stopTimerSequenceStop and dismiss the timer sequence.
skipTimerStepSkip to the next step in the sequence.
previousTimerStepGo back to the previous step in the sequence.
getTimerStateGet the current state of a timer sequence.
addListenerAdd a listener for timer sequence events. Events include: stepChange, complete, tick, paused, resumed, stopped, loopComplete.

This reference is synced from src/definitions.ts in capacitor-live-activities.

Keep going from @capgo/capacitor-live-activities

Section titled “Keep going from @capgo/capacitor-live-activities”

If you are using @capgo/capacitor-live-activities to plan native media and interface behavior, connect it with Using @capgo/capacitor-live-activities for the native capability in Using @capgo/capacitor-live-activities, Using @capgo/capacitor-video-player for the native capability in Using @capgo/capacitor-video-player, @capgo/capacitor-video-player for the implementation detail in @capgo/capacitor-video-player, Using @capgo/capacitor-native-navigation for the native capability in Using @capgo/capacitor-native-navigation, and @capgo/capacitor-native-navigation for the implementation detail in @capgo/capacitor-native-navigation.