tauri-plugin-live-activity 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +2 -2
- package/README.md +2 -2
- package/dist-js/types.d.ts +11 -4
- package/package.json +2 -2
package/README.ko.md
CHANGED
|
@@ -155,7 +155,7 @@ fn deliver<R: Runtime>(app: &AppHandle<R>) -> Result<()> {
|
|
|
155
155
|
snapshot: snapshot(0, "On time"),
|
|
156
156
|
android: None, // Android 전용: 잠금 화면 표시 범위는 `AndroidOptions::new(visibility)`
|
|
157
157
|
ios: None, // iOS 전용: `IosOptions::new(transient)`이면 일시적 액티비티(iOS 18)
|
|
158
|
-
scheduled: None, // iOS 26: `ScheduledStart::new(at, alert)`이면 나중에 시작
|
|
158
|
+
scheduled: None, // iOS 26과 Android: `ScheduledStart::new(at, alert)`이면 나중에 시작
|
|
159
159
|
push: None, // iOS 전용: `Some(LayoutPush::Token)`이면 액티비티의 APNs 토큰을 요청
|
|
160
160
|
};
|
|
161
161
|
let activity = app.live_activity().start_layout(input)?;
|
|
@@ -198,7 +198,7 @@ await updateLayout({ id: snack.id, snapshot: { revision: 1, values: { title: 'Mo
|
|
|
198
198
|
await endLayout({ id: snack.id, policy: { kind: 'immediate' } });
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
시작 요청에 `scheduled: { at, alert }`를 주면 나중에 시작하고(iOS 26), `ios: { transient: true }`이면 일시적 액티비티가 됩니다(iOS 18). 레이아웃은 시작한 모습 그대로이고, 갱신마다 모든 값을 더 높은 revision으로 다시 보냅니다. 탭은
|
|
201
|
+
시작 요청에 `scheduled: { at, alert }`를 주면 나중에 시작하고(iOS 26과 Android), `ios: { transient: true }`이면 일시적 액티비티가 됩니다(iOS 18). 레이아웃은 시작한 모습 그대로이고, 갱신마다 모든 값을 더 높은 revision으로 다시 보냅니다. 탭은
|
|
202
202
|
`onAction`으로, 푸시 토큰과 푸시된 내용은 `onPushToken`, `onPushToStartToken`, `onUpdated`로, 앱이 호출하지 않은
|
|
203
203
|
액티비티의 변화는 `onState`, `onStarted`, `onOpened`(Android: 액티비티의 알림으로 앱을 연 일. 앱을 실행시킨 열림도 페이지가 구독할 때까지 보관됩니다), `onPermissions`로 옵니다.
|
|
204
204
|
|
package/README.md
CHANGED
|
@@ -156,7 +156,7 @@ fn deliver<R: Runtime>(app: &AppHandle<R>) -> Result<()> {
|
|
|
156
156
|
snapshot: snapshot(0, "On time"),
|
|
157
157
|
android: None, // Android only: `AndroidOptions::new(visibility)` for the lock screen
|
|
158
158
|
ios: None, // iOS only: `IosOptions::new(transient)` for a transient activity (iOS 18)
|
|
159
|
-
scheduled: None, // iOS 26: `ScheduledStart::new(at, alert)` starts it later
|
|
159
|
+
scheduled: None, // iOS 26 and Android: `ScheduledStart::new(at, alert)` starts it later
|
|
160
160
|
push: None, // iOS only: `Some(LayoutPush::Token)` asks for the activity's APNs token
|
|
161
161
|
};
|
|
162
162
|
let activity = app.live_activity().start_layout(input)?;
|
|
@@ -199,7 +199,7 @@ await updateLayout({ id: snack.id, snapshot: { revision: 1, values: { title: 'Mo
|
|
|
199
199
|
await endLayout({ id: snack.id, policy: { kind: 'immediate' } });
|
|
200
200
|
```
|
|
201
201
|
|
|
202
|
-
A start may also carry `scheduled: { at, alert }` to begin later (iOS 26), and `ios: { transient: true }` for a transient
|
|
202
|
+
A start may also carry `scheduled: { at, alert }` to begin later (iOS 26 and Android), and `ios: { transient: true }` for a transient
|
|
203
203
|
activity (iOS 18). The layout stays as it started; each update sends every value again, with a higher revision. Taps come to
|
|
204
204
|
`onAction`, push tokens and pushed content to `onPushToken`, `onPushToStartToken` and `onUpdated`, and what happens
|
|
205
205
|
to an activity outside the app's calls to `onState`, `onStarted`, `onOpened` (Android: the person opened the app from an
|
package/dist-js/types.d.ts
CHANGED
|
@@ -60,6 +60,10 @@ export interface AndroidPresentationSupport {
|
|
|
60
60
|
readonly publicVersion: boolean;
|
|
61
61
|
/** A small icon, an accent color and a sub text. */
|
|
62
62
|
readonly branding: boolean;
|
|
63
|
+
/** A start with `scheduled`, which Android begins at its time, also while the app does not run; `UNSUPPORTED_FEATURE` without it. */
|
|
64
|
+
readonly scheduledStart: boolean;
|
|
65
|
+
/** Whether a scheduled start begins at its time: the app may set exact alarms. Without it Android chooses the moment, within minutes. */
|
|
66
|
+
readonly exactStart: boolean;
|
|
63
67
|
}
|
|
64
68
|
export interface Permissions {
|
|
65
69
|
readonly notifications: PermissionState;
|
|
@@ -125,7 +129,7 @@ export interface EndInput {
|
|
|
125
129
|
/** Unsupported policies fail explicitly instead of being silently ignored. */
|
|
126
130
|
readonly policy: EndPolicy;
|
|
127
131
|
}
|
|
128
|
-
/** `pending`: scheduled and not started yet (iOS 26). */
|
|
132
|
+
/** `pending`: scheduled and not started yet (iOS 26 and Android). */
|
|
129
133
|
export type ActivityState = 'pending' | 'active' | 'stale' | 'ended' | 'dismissed' | 'unknown';
|
|
130
134
|
export type PromotionState = 'promoted' | 'notPromoted' | 'unknown' | 'notApplicable';
|
|
131
135
|
export interface ActivityRecord {
|
|
@@ -775,9 +779,12 @@ export interface LayoutIosOptions {
|
|
|
775
779
|
readonly transient: boolean;
|
|
776
780
|
}
|
|
777
781
|
/**
|
|
778
|
-
* A start at a later time instead of now
|
|
779
|
-
* is
|
|
780
|
-
* `CONFLICT`, since it begins with the content of its start. `onState` reports `active` when it begins.
|
|
782
|
+
* A start at a later time instead of now: iOS 26, and Android where `getCapabilities().androidPresentation.scheduledStart`
|
|
783
|
+
* is true. Until then the record is `pending`: the activity holds its key, it can be ended, and an update is
|
|
784
|
+
* `CONFLICT`, since it begins with the content of its start. `onState` reports `active` when it begins. On Android
|
|
785
|
+
* it begins at its time with the permission for exact alarms (`exactStart`) and within minutes without. It is
|
|
786
|
+
* `UNSUPPORTED_FEATURE`, and nothing is kept, before iOS 26, with the foreground placement on Android, and where
|
|
787
|
+
* `scheduledStart` is false.
|
|
781
788
|
*/
|
|
782
789
|
export interface LayoutScheduledStart {
|
|
783
790
|
/** UTC Unix epoch milliseconds. A time that has passed starts the activity at once. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tauri-plugin-live-activity",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Tauri 2 plugin for iOS Live Activities (ActivityKit and Dynamic Island) and Android Live Updates with ongoing notification fallback",
|
|
5
5
|
"author": "1eedaegon",
|
|
6
6
|
"type": "module",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"build": "tsc -p tsconfig.json",
|
|
34
34
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p examples/demo/tsconfig.json",
|
|
35
35
|
"test": "npm run build && npm run test:contracts && npm run test:api && npm run test:jsx && npm run test:react && npm run test:demo && npm run test:setup",
|
|
36
|
-
"test:contracts": "node --test --experimental-test-coverage \"--test-coverage-include=tools/validate-request.mjs\" --test-coverage-lines=80 --test-coverage-branches=80 --test-coverage-functions=80 tests/requests.test.mjs tests/layout-requests.test.mjs tests/contract-
|
|
36
|
+
"test:contracts": "node --test --experimental-test-coverage \"--test-coverage-include=tools/validate-request.mjs\" --test-coverage-lines=80 --test-coverage-branches=80 --test-coverage-functions=80 tests/requests.test.mjs tests/layout-requests.test.mjs tests/contract-files.test.mjs tests/android-liveupdate.test.mjs tests/android-contents.test.mjs tests/ci.test.mjs tests/ci-cache.test.mjs tests/spec-coverage.test.mjs",
|
|
37
37
|
"test:api": "node --test --experimental-test-coverage \"--test-coverage-include=dist-js/*.js\" --test-coverage-lines=80 --test-coverage-branches=80 --test-coverage-functions=80 tests/api.test.mjs tests/api-reload.test.mjs",
|
|
38
38
|
"test:jsx": "node --experimental-strip-types --test --experimental-test-coverage \"--test-coverage-include=dist-js/jsx/*.js\" --test-coverage-lines=80 --test-coverage-branches=80 --test-coverage-functions=80 tests/jsx.test.mjs",
|
|
39
39
|
"test:react": "node --test --experimental-test-coverage \"--test-coverage-include=dist-js/react/*.js\" --test-coverage-lines=80 --test-coverage-branches=80 --test-coverage-functions=80 tests/react.test.mjs",
|