/** * `react-native-live-activity-kit` — public client API. * * A thin, fully-typed wrapper over the single Nitro HybridObject. It normalizes * friendly options into the flat native config, ref-counts event subscribers * behind a single native callback per event, and converts native optionals into * the `null`-shaped public types. Live Activities are iOS-only; every method is * a safe no-op (or a typed rejection) on Android and web. * * The matching server sender lives at `react-native-live-activity-kit/server`. * * @packageDocumentation */ import { type ActivityState, type ActivityStateChange, type EndLiveActivityOptions, type LiveActivity, type LiveActivityInfo, type PushTokenChange, type StartLiveActivityOptions, type Subscription, type UpdateLiveActivityOptions } from './types.js'; export * from './types.js'; /** `true` on platforms that can run Live Activities (iOS only). */ export declare const isSupported: boolean; /** Whether the user has Live Activities enabled for this app. `false` off-iOS. */ export declare function areActivitiesEnabled(): boolean; /** * Start (request) a Live Activity locally. Resolves with a {@link LiveActivity} * handle (its id and, when available, the per-activity push token). * @throws {@link LiveActivityError} off-iOS or when ActivityKit refuses. */ export declare function startLiveActivity(options: StartLiveActivityOptions): Promise; /** Update a running activity's content state. No-op off-iOS. */ export declare function updateLiveActivity(id: string, options: UpdateLiveActivityOptions): Promise; /** End a specific activity. No-op off-iOS. */ export declare function endLiveActivity(id: string, options?: EndLiveActivityOptions): Promise; /** End every activity started by this app. No-op off-iOS. */ export declare function endAllLiveActivities(options?: EndLiveActivityOptions): Promise; /** Snapshot of every activity this app currently knows about. `[]` off-iOS. */ export declare function getActiveLiveActivities(): Promise; /** Lifecycle state of one activity. `'unknown'` off-iOS. */ export declare function getLiveActivityState(id: string): Promise; /** Current per-activity APNs update token (hex), or `null`. */ export declare function getPushToken(id: string): Promise; /** Current push-to-start token (hex) for remote `start` (iOS 17.2+), or `null`. */ export declare function getPushToStartToken(): Promise; /** Subscribe to activity lifecycle changes (active → ended/dismissed/stale). */ export declare function addActivityStateListener(listener: (event: ActivityStateChange) => void): Subscription; /** * Subscribe to per-activity APNs **update** token changes. Fires when a token is * first issued and again whenever iOS rotates it — register your backend's token * store here so remote updates keep working. */ export declare function addPushTokenListener(listener: (event: PushTokenChange) => void): Subscription; /** * Subscribe to push-to-start token changes (iOS 17.2+). Send this token to your * backend so it can remotely `start` an activity even while the app is killed. */ export declare function addPushToStartTokenListener(listener: (token: string) => void): Subscription; /** Subscribe to changes in the user's Live Activities enablement setting. */ export declare function addEnablementListener(listener: (enabled: boolean) => void): Subscription; //# sourceMappingURL=index.d.ts.map