[{"data":1,"prerenderedAt":1650},["ShallowReactive",2],{"navigation":3,"\u002Ffeatures\u002Flive-activities":252,"\u002Ffeatures\u002Flive-activities-surround":1645},[4,89,128,171,213,217,248],{"title":5,"path":6,"stem":7,"children":8,"icon":88},"Guide","\u002Fguide","1.guide\u002F01.index",[9,10,14,18,22,26,30,34,38,42,73],{"title":5,"path":6,"stem":7},{"title":11,"path":12,"stem":13},"Install","\u002Fguide\u002Finstall","1.guide\u002F02.install",{"title":15,"path":16,"stem":17},"First widget","\u002Fguide\u002Ffirst-widget","1.guide\u002F03.first-widget",{"title":19,"path":20,"stem":21},"Concepts","\u002Fguide\u002Fconcepts","1.guide\u002F05.concepts",{"title":23,"path":24,"stem":25},"Apple data transport","\u002Fguide\u002Ftransport","1.guide\u002F06.transport",{"title":27,"path":28,"stem":29},"Doctor","\u002Fguide\u002Fdoctor","1.guide\u002F07.doctor",{"title":31,"path":32,"stem":33},"CLI","\u002Fguide\u002Fcli","1.guide\u002F08.cli",{"title":35,"path":36,"stem":37},"Core vs extended","\u002Fguide\u002Ftiers","1.guide\u002F09.tiers",{"title":39,"path":40,"stem":41},"Troubleshooting","\u002Fguide\u002Ftroubleshooting","1.guide\u002F10.troubleshooting",{"title":43,"path":44,"stem":45,"children":46,"icon":72},"Platform setup","\u002Fguide\u002Fsetup","1.guide\u002F12.setup\u002F1.index",[47,48,52,56,60,64,68],{"title":43,"path":44,"stem":45},{"title":49,"path":50,"stem":51},"Android setup","\u002Fguide\u002Fsetup\u002Fandroid","1.guide\u002F12.setup\u002F2.android",{"title":53,"path":54,"stem":55},"iOS setup","\u002Fguide\u002Fsetup\u002Fios","1.guide\u002F12.setup\u002F3.ios",{"title":57,"path":58,"stem":59},"macOS setup","\u002Fguide\u002Fsetup\u002Fmacos","1.guide\u002F12.setup\u002F4.macos",{"title":61,"path":62,"stem":63},"Windows setup","\u002Fguide\u002Fsetup\u002Fwindows","1.guide\u002F12.setup\u002F5.windows",{"title":65,"path":66,"stem":67},"Linux setup","\u002Fguide\u002Fsetup\u002Flinux","1.guide\u002F12.setup\u002F6.linux",{"title":69,"path":70,"stem":71},"Desktop webview","\u002Fguide\u002Fsetup\u002Fdesktop","1.guide\u002F12.setup\u002F7.desktop","i-lucide-monitor-smartphone",{"title":74,"icon":75,"path":76,"stem":77,"children":78,"page":87},"Recipes","i-lucide-chef-hat","\u002Fguide\u002Frecipes","1.guide\u002F13.recipes",[79,83],{"title":80,"path":81,"stem":82},"Multi-widget","\u002Fguide\u002Frecipes\u002Fmulti-widget","1.guide\u002F13.recipes\u002F4.multi-widget",{"title":84,"path":85,"stem":86},"Testing your widget","\u002Fguide\u002Frecipes\u002Ftesting","1.guide\u002F13.recipes\u002F5.testing",false,"i-lucide-rocket",{"title":90,"path":91,"stem":92,"children":93,"icon":127},"Elements","\u002Felements","2.elements\u002F1.index",[94,95,99,103,107,111,115,119,123],{"title":90,"path":91,"stem":92},{"title":96,"path":97,"stem":98},"Layout elements","\u002Felements\u002Flayout","2.elements\u002F2.layout",{"title":100,"path":101,"stem":102},"Text elements","\u002Felements\u002Ftext","2.elements\u002F3.text",{"title":104,"path":105,"stem":106},"Media elements","\u002Felements\u002Fmedia","2.elements\u002F4.media",{"title":108,"path":109,"stem":110},"Data elements","\u002Felements\u002Fdata","2.elements\u002F5.data",{"title":112,"path":113,"stem":114},"Interactive elements","\u002Felements\u002Finteractive","2.elements\u002F6.interactive",{"title":116,"path":117,"stem":118},"Spacing elements","\u002Felements\u002Fspacing","2.elements\u002F7.spacing",{"title":120,"path":121,"stem":122},"Style","\u002Felements\u002Fstyle","2.elements\u002F8.style",{"title":124,"path":125,"stem":126},"Colors","\u002Felements\u002Fcolors","2.elements\u002F9.colors","i-lucide-blocks",{"title":129,"path":130,"stem":131,"children":132,"icon":170},"Features","\u002Ffeatures","2.features\u002F01.index",[133,134,138,142,146,150,154,158,162,166],{"title":129,"path":130,"stem":131},{"title":135,"path":136,"stem":137},"Dynamic Island","\u002Ffeatures\u002Fdynamic-island","2.features\u002F02.dynamic-island",{"title":139,"path":140,"stem":141},"Interactive widgets","\u002Ffeatures\u002Finteractive","2.features\u002F03.interactive",{"title":143,"path":144,"stem":145},"Live activities","\u002Ffeatures\u002Flive-activities","2.features\u002F04.live-activities",{"title":147,"path":148,"stem":149},"Timelines and transitions","\u002Ffeatures\u002Ftimelines","2.features\u002F05.timelines",{"title":151,"path":152,"stem":153},"Remote data","\u002Ffeatures\u002Fremote-data","2.features\u002F06.remote-data",{"title":155,"path":156,"stem":157},"Widget updater","\u002Ffeatures\u002Fwidget-updater","2.features\u002F07.widget-updater",{"title":159,"path":160,"stem":161},"Instances","\u002Ffeatures\u002Finstances","2.features\u002F08.instances",{"title":163,"path":164,"stem":165},"Conditions, lists and templates","\u002Ffeatures\u002Fdynamic-content","2.features\u002F09.dynamic-content",{"title":167,"path":168,"stem":169},"Images","\u002Ffeatures\u002Fimages","2.features\u002F10.images","i-lucide-sparkles",{"title":172,"icon":173,"path":174,"stem":175,"children":176,"page":87},"API","i-lucide-file-code","\u002Fapi","3.api",[177,181,185,189,193,197,201,205,209],{"title":178,"path":179,"stem":180},"JavaScript API","\u002Fapi\u002Fjs","3.api\u002F1.js",{"title":182,"path":183,"stem":184},"JS reference","\u002Fapi\u002Freference","3.api\u002F2.reference",{"title":186,"path":187,"stem":188},"Rust API","\u002Fapi\u002Frust","3.api\u002F3.rust",{"title":190,"path":191,"stem":192},"Tauri commands","\u002Fapi\u002Fcommands","3.api\u002F4.commands",{"title":194,"path":195,"stem":196},"Plugin config","\u002Fapi\u002Fplugin-config","3.api\u002F5.plugin-config",{"title":198,"path":199,"stem":200},"Cargo features","\u002Fapi\u002Fcargo-features","3.api\u002F6.cargo-features",{"title":202,"path":203,"stem":204},"Environment variables","\u002Fapi\u002Fenv","3.api\u002F7.env",{"title":206,"path":207,"stem":208},"Permissions","\u002Fapi\u002Fpermissions","3.api\u002F8.permissions",{"title":210,"path":211,"stem":212},"JSON Schema","\u002Fapi\u002Fjson-schema","3.api\u002F9.json-schema",{"title":214,"path":215,"stem":216},"Showcase","\u002Fshowcase","4.showcase",{"title":218,"path":219,"stem":220,"children":221,"icon":247},"Contributing","\u002Fcontributing","5.contributing\u002F1.index",[222,223,227,231,235,239,243],{"title":218,"path":219,"stem":220},{"title":224,"path":225,"stem":226},"Development guide","\u002Fcontributing\u002Fdevelopment","5.contributing\u002F2.development",{"title":228,"path":229,"stem":230},"Render testing (config → geometry \u002F pixels)","\u002Fcontributing\u002Frender-testing","5.contributing\u002F3.render-testing",{"title":232,"path":233,"stem":234},"Visual stand (Level-2 pixels)","\u002Fcontributing\u002Fvisual-stand","5.contributing\u002F4.visual-stand",{"title":236,"path":237,"stem":238},"Linux harness (Docker)","\u002Fcontributing\u002Flinux-harness","5.contributing\u002F5.linux-harness",{"title":240,"path":241,"stem":242},"Windows surface split","\u002Fcontributing\u002Fwindows-surfaces","5.contributing\u002F6.windows-surfaces",{"title":244,"path":245,"stem":246},"Mutation testing","\u002Fcontributing\u002Fmutation-testing","5.contributing\u002F7.mutation-testing","i-lucide-git-pull-request",{"title":249,"path":250,"stem":251},"Changelog","\u002Fchangelog","6.changelog",{"id":253,"title":143,"body":254,"description":1637,"extension":1638,"generated":87,"links":1639,"meta":1640,"navigation":376,"path":144,"seo":1641,"stem":145,"__hash__":1644},"docs\u002F2.features\u002F04.live-activities.md",{"type":255,"value":256,"toc":1630},"minimark",[257,261,309,314,663,718,736,770,775,778,1277,1327,1331,1376,1394,1416,1419,1425,1429,1514,1518,1626],[258,259,260],"p",{},"A live activity shows a running task — a delivery, a timer, a download — outside the app.",[262,263,264,277],"table",{},[265,266,267],"thead",{},[268,269,270,274],"tr",{},[271,272,273],"th",{},"Platform",[271,275,276],{},"Surface",[278,279,280,289,297],"tbody",{},[268,281,282,286],{},[283,284,285],"td",{},"iOS 16.2+",[283,287,288],{},"Live Activity on the Lock Screen and in the Dynamic Island",[268,290,291,294],{},[283,292,293],{},"Android 8+",[283,295,296],{},"Ongoing notification; Android 16 promotes it to a Live Update chip when the user allows",[268,298,299,302],{},[283,300,301],{},"macOS \u002F Windows \u002F Linux",[283,303,304,308],{},[305,306,307],"a",{"href":136},"Dynamic-Island pill"," at the top centre (around the notch on notched Macs); expands on hover",[310,311],"demo-video",{"caption":312,"src":313},"On desktop the activity is a Dynamic-Island pill: compact, expanded on hover (built-in renderer).","island-states",[315,316,321],"pre",{"className":317,"code":318,"language":319,"meta":320,"style":320},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { startActivity, updateActivity, endActivity } from \"tauri-plugin-widgets-api\";\n\nawait startActivity({\n  id: \"order.42\",\n  title: \"Order #42\",\n  body: \"Driver en route\",\n  icon: \"bicycle\",\n  progress: 0.3,\n  endsAt: Date.now() + 12 * 60_000,\n  actions: [{ id: \"call\", label: \"Call driver\" }],\n});\n\nawait updateActivity({ id: \"order.42\", title: \"Order #42\", body: \"Arriving\", progress: 0.9 });\nawait endActivity(\"order.42\", 5_000);\n","ts","",[322,323,324,371,378,393,413,430,447,464,478,512,559,570,575,639],"code",{"__ignoreMap":320},[325,326,329,333,337,341,344,347,349,352,355,358,361,365,368],"span",{"class":327,"line":328},"line",1,[325,330,332],{"class":331},"s7zQu","import",[325,334,336],{"class":335},"sMK4o"," {",[325,338,340],{"class":339},"sTEyZ"," startActivity",[325,342,343],{"class":335},",",[325,345,346],{"class":339}," updateActivity",[325,348,343],{"class":335},[325,350,351],{"class":339}," endActivity",[325,353,354],{"class":335}," }",[325,356,357],{"class":331}," from",[325,359,360],{"class":335}," \"",[325,362,364],{"class":363},"sfazB","tauri-plugin-widgets-api",[325,366,367],{"class":335},"\"",[325,369,370],{"class":335},";\n",[325,372,374],{"class":327,"line":373},2,[325,375,377],{"emptyLinePlaceholder":376},true,"\n",[325,379,381,384,387,390],{"class":327,"line":380},3,[325,382,383],{"class":331},"await",[325,385,340],{"class":386},"s2Zo4",[325,388,389],{"class":339},"(",[325,391,392],{"class":335},"{\n",[325,394,396,400,403,405,408,410],{"class":327,"line":395},4,[325,397,399],{"class":398},"swJcz","  id",[325,401,402],{"class":335},":",[325,404,360],{"class":335},[325,406,407],{"class":363},"order.42",[325,409,367],{"class":335},[325,411,412],{"class":335},",\n",[325,414,416,419,421,423,426,428],{"class":327,"line":415},5,[325,417,418],{"class":398},"  title",[325,420,402],{"class":335},[325,422,360],{"class":335},[325,424,425],{"class":363},"Order #42",[325,427,367],{"class":335},[325,429,412],{"class":335},[325,431,433,436,438,440,443,445],{"class":327,"line":432},6,[325,434,435],{"class":398},"  body",[325,437,402],{"class":335},[325,439,360],{"class":335},[325,441,442],{"class":363},"Driver en route",[325,444,367],{"class":335},[325,446,412],{"class":335},[325,448,450,453,455,457,460,462],{"class":327,"line":449},7,[325,451,452],{"class":398},"  icon",[325,454,402],{"class":335},[325,456,360],{"class":335},[325,458,459],{"class":363},"bicycle",[325,461,367],{"class":335},[325,463,412],{"class":335},[325,465,467,470,472,476],{"class":327,"line":466},8,[325,468,469],{"class":398},"  progress",[325,471,402],{"class":335},[325,473,475],{"class":474},"sbssI"," 0.3",[325,477,412],{"class":335},[325,479,481,484,486,489,492,495,498,501,504,507,510],{"class":327,"line":480},9,[325,482,483],{"class":398},"  endsAt",[325,485,402],{"class":335},[325,487,488],{"class":339}," Date",[325,490,491],{"class":335},".",[325,493,494],{"class":386},"now",[325,496,497],{"class":339},"() ",[325,499,500],{"class":335},"+",[325,502,503],{"class":474}," 12",[325,505,506],{"class":335}," *",[325,508,509],{"class":474}," 60_000",[325,511,412],{"class":335},[325,513,515,518,520,523,526,529,531,533,536,538,540,543,545,547,550,552,554,557],{"class":327,"line":514},10,[325,516,517],{"class":398},"  actions",[325,519,402],{"class":335},[325,521,522],{"class":339}," [",[325,524,525],{"class":335},"{",[325,527,528],{"class":398}," id",[325,530,402],{"class":335},[325,532,360],{"class":335},[325,534,535],{"class":363},"call",[325,537,367],{"class":335},[325,539,343],{"class":335},[325,541,542],{"class":398}," label",[325,544,402],{"class":335},[325,546,360],{"class":335},[325,548,549],{"class":363},"Call driver",[325,551,367],{"class":335},[325,553,354],{"class":335},[325,555,556],{"class":339},"]",[325,558,412],{"class":335},[325,560,562,565,568],{"class":327,"line":561},11,[325,563,564],{"class":335},"}",[325,566,567],{"class":339},")",[325,569,370],{"class":335},[325,571,573],{"class":327,"line":572},12,[325,574,377],{"emptyLinePlaceholder":376},[325,576,578,580,582,584,586,588,590,592,594,596,598,601,603,605,607,609,611,614,616,618,621,623,625,628,630,633,635,637],{"class":327,"line":577},13,[325,579,383],{"class":331},[325,581,346],{"class":386},[325,583,389],{"class":339},[325,585,525],{"class":335},[325,587,528],{"class":398},[325,589,402],{"class":335},[325,591,360],{"class":335},[325,593,407],{"class":363},[325,595,367],{"class":335},[325,597,343],{"class":335},[325,599,600],{"class":398}," title",[325,602,402],{"class":335},[325,604,360],{"class":335},[325,606,425],{"class":363},[325,608,367],{"class":335},[325,610,343],{"class":335},[325,612,613],{"class":398}," body",[325,615,402],{"class":335},[325,617,360],{"class":335},[325,619,620],{"class":363},"Arriving",[325,622,367],{"class":335},[325,624,343],{"class":335},[325,626,627],{"class":398}," progress",[325,629,402],{"class":335},[325,631,632],{"class":474}," 0.9",[325,634,354],{"class":335},[325,636,567],{"class":339},[325,638,370],{"class":335},[325,640,642,644,646,648,650,652,654,656,659,661],{"class":327,"line":641},14,[325,643,383],{"class":331},[325,645,351],{"class":386},[325,647,389],{"class":339},[325,649,367],{"class":335},[325,651,407],{"class":363},[325,653,367],{"class":335},[325,655,343],{"class":335},[325,657,658],{"class":474}," 5_000",[325,660,567],{"class":339},[325,662,370],{"class":335},[258,664,665,666,669,670,673,674,673,677,673,680,673,683,686,687,690,691,693,694,697,698,697,701,704,705,709,710,714,715,717],{},"Without ",[322,667,668],{},"layout",", the plugin builds one from ",[322,671,672],{},"title",", ",[322,675,676],{},"body",[322,678,679],{},"icon",[322,681,682],{},"progress",[322,684,685],{},"endsAt","\nand ",[322,688,689],{},"actions",", so a plain request looks alike everywhere. Pass ",[322,692,668],{}," (any widget\nelement) for your own design, and ",[322,695,696],{},"compactLeading"," \u002F ",[322,699,700],{},"compactTrailing",[322,702,703],{},"minimal"," for the\nDynamic Island. The request must stay under ",[706,707,708],"strong",{},"4 KiB"," of JSON — the ActivityKit limit,\nchecked on every platform so nothing works on desktop and fails on an iPhone. The check\ncounts the request ",[711,712,713],"em",{},"including"," the layout the plugin generates when ",[322,716,668],{}," is omitted.",[258,719,720,721,723,724,727,728,731,732,735],{},"Taps on ",[322,722,689],{}," (Android buttons, buttons in your layout) arrive through\n",[322,725,726],{},"onWidgetAction"," with ",[322,729,730],{},"widgetId: \"activity.\u003Cid>\"",". ",[322,733,734],{},"url"," opens a deep link on tap.",[258,737,738,739,742,743,746,747,750,751,754,755,758,759,762,763,697,766,769],{},"iOS also reads ",[322,740,741],{},"relevanceScore"," (which activity the system shows first), ",[322,744,745],{},"alert","\n(",[322,748,749],{},"{ title, body, sound? }",", lights the screen with the update) and ",[322,752,753],{},"timestamp"," (Unix ms;\nan update older than the shown one is dropped). ",[322,756,757],{},"endActivity(id, dismissAfterMs, { content, dismissalPolicy })"," ends with a final state; ",[322,760,761],{},"dismissalPolicy: \"immediate\""," removes it at\nonce. ",[322,764,765],{},"onActivityState",[322,767,768],{},"onActivityContent"," report what the OS did (ended, dismissed,\npush-updated).",[771,772,774],"h2",{"id":773},"templates-data-only-updates","Templates: data-only updates",[258,776,777],{},"Store the layout on the device once, then send only data. The update stays far below 4 KiB,\nwhich matters for frequent and push updates.",[315,779,781],{"className":317,"code":780,"language":319,"meta":320,"style":320},"import { registerActivityTemplate, startActivity, updateActivity } from \"tauri-plugin-widgets-api\";\n\nawait registerActivityTemplate(\"delivery\", {\n  title: \"Order {{data.order}}\",\n  lockScreen: {\n    type: \"vstack\",\n    children: [\n      { type: \"text\", content: \"{{data.driver}} arrives in {{data.eta}} min\" },\n      { type: \"progress\", value: 0, bind: { value: \"data.progress\" } },\n      { type: \"text\", content: \"Running late\", when: { path: \"data.late\" } },\n    ],\n  },\n  compactTrailing: { type: \"text\", content: \"{{data.eta}}′\", transition: \"numeric\" },\n});\n\nawait startActivity({ id: \"order.42\", template: \"delivery\", data: { order: \"#42\", driver: \"Ann\", eta: 12, progress: 0.2 } });\nawait updateActivity({ id: \"order.42\", template: \"delivery\", data: { order: \"#42\", driver: \"Ann\", eta: 4, progress: 0.8 } });\n",[322,782,783,812,816,836,851,860,876,886,920,968,1020,1027,1032,1080,1088,1093,1188],{"__ignoreMap":320},[325,784,785,787,789,792,794,796,798,800,802,804,806,808,810],{"class":327,"line":328},[325,786,332],{"class":331},[325,788,336],{"class":335},[325,790,791],{"class":339}," registerActivityTemplate",[325,793,343],{"class":335},[325,795,340],{"class":339},[325,797,343],{"class":335},[325,799,346],{"class":339},[325,801,354],{"class":335},[325,803,357],{"class":331},[325,805,360],{"class":335},[325,807,364],{"class":363},[325,809,367],{"class":335},[325,811,370],{"class":335},[325,813,814],{"class":327,"line":373},[325,815,377],{"emptyLinePlaceholder":376},[325,817,818,820,822,824,826,829,831,833],{"class":327,"line":380},[325,819,383],{"class":331},[325,821,791],{"class":386},[325,823,389],{"class":339},[325,825,367],{"class":335},[325,827,828],{"class":363},"delivery",[325,830,367],{"class":335},[325,832,343],{"class":335},[325,834,835],{"class":335}," {\n",[325,837,838,840,842,844,847,849],{"class":327,"line":395},[325,839,418],{"class":398},[325,841,402],{"class":335},[325,843,360],{"class":335},[325,845,846],{"class":363},"Order {{data.order}}",[325,848,367],{"class":335},[325,850,412],{"class":335},[325,852,853,856,858],{"class":327,"line":415},[325,854,855],{"class":398},"  lockScreen",[325,857,402],{"class":335},[325,859,835],{"class":335},[325,861,862,865,867,869,872,874],{"class":327,"line":432},[325,863,864],{"class":398},"    type",[325,866,402],{"class":335},[325,868,360],{"class":335},[325,870,871],{"class":363},"vstack",[325,873,367],{"class":335},[325,875,412],{"class":335},[325,877,878,881,883],{"class":327,"line":449},[325,879,880],{"class":398},"    children",[325,882,402],{"class":335},[325,884,885],{"class":339}," [\n",[325,887,888,891,894,896,898,901,903,905,908,910,912,915,917],{"class":327,"line":466},[325,889,890],{"class":335},"      {",[325,892,893],{"class":398}," type",[325,895,402],{"class":335},[325,897,360],{"class":335},[325,899,900],{"class":363},"text",[325,902,367],{"class":335},[325,904,343],{"class":335},[325,906,907],{"class":398}," content",[325,909,402],{"class":335},[325,911,360],{"class":335},[325,913,914],{"class":363},"{{data.driver}} arrives in {{data.eta}} min",[325,916,367],{"class":335},[325,918,919],{"class":335}," },\n",[325,921,922,924,926,928,930,932,934,936,939,941,944,946,949,951,953,955,957,959,962,964,966],{"class":327,"line":480},[325,923,890],{"class":335},[325,925,893],{"class":398},[325,927,402],{"class":335},[325,929,360],{"class":335},[325,931,682],{"class":363},[325,933,367],{"class":335},[325,935,343],{"class":335},[325,937,938],{"class":398}," value",[325,940,402],{"class":335},[325,942,943],{"class":474}," 0",[325,945,343],{"class":335},[325,947,948],{"class":398}," bind",[325,950,402],{"class":335},[325,952,336],{"class":335},[325,954,938],{"class":398},[325,956,402],{"class":335},[325,958,360],{"class":335},[325,960,961],{"class":363},"data.progress",[325,963,367],{"class":335},[325,965,354],{"class":335},[325,967,919],{"class":335},[325,969,970,972,974,976,978,980,982,984,986,988,990,993,995,997,1000,1002,1004,1007,1009,1011,1014,1016,1018],{"class":327,"line":514},[325,971,890],{"class":335},[325,973,893],{"class":398},[325,975,402],{"class":335},[325,977,360],{"class":335},[325,979,900],{"class":363},[325,981,367],{"class":335},[325,983,343],{"class":335},[325,985,907],{"class":398},[325,987,402],{"class":335},[325,989,360],{"class":335},[325,991,992],{"class":363},"Running late",[325,994,367],{"class":335},[325,996,343],{"class":335},[325,998,999],{"class":398}," when",[325,1001,402],{"class":335},[325,1003,336],{"class":335},[325,1005,1006],{"class":398}," path",[325,1008,402],{"class":335},[325,1010,360],{"class":335},[325,1012,1013],{"class":363},"data.late",[325,1015,367],{"class":335},[325,1017,354],{"class":335},[325,1019,919],{"class":335},[325,1021,1022,1025],{"class":327,"line":561},[325,1023,1024],{"class":339},"    ]",[325,1026,412],{"class":335},[325,1028,1029],{"class":327,"line":572},[325,1030,1031],{"class":335},"  },\n",[325,1033,1034,1037,1039,1041,1043,1045,1047,1049,1051,1053,1055,1057,1059,1062,1064,1066,1069,1071,1073,1076,1078],{"class":327,"line":577},[325,1035,1036],{"class":398},"  compactTrailing",[325,1038,402],{"class":335},[325,1040,336],{"class":335},[325,1042,893],{"class":398},[325,1044,402],{"class":335},[325,1046,360],{"class":335},[325,1048,900],{"class":363},[325,1050,367],{"class":335},[325,1052,343],{"class":335},[325,1054,907],{"class":398},[325,1056,402],{"class":335},[325,1058,360],{"class":335},[325,1060,1061],{"class":363},"{{data.eta}}′",[325,1063,367],{"class":335},[325,1065,343],{"class":335},[325,1067,1068],{"class":398}," transition",[325,1070,402],{"class":335},[325,1072,360],{"class":335},[325,1074,1075],{"class":363},"numeric",[325,1077,367],{"class":335},[325,1079,919],{"class":335},[325,1081,1082,1084,1086],{"class":327,"line":641},[325,1083,564],{"class":335},[325,1085,567],{"class":339},[325,1087,370],{"class":335},[325,1089,1091],{"class":327,"line":1090},15,[325,1092,377],{"emptyLinePlaceholder":376},[325,1094,1096,1098,1100,1102,1104,1106,1108,1110,1112,1114,1116,1119,1121,1123,1125,1127,1129,1132,1134,1136,1139,1141,1143,1146,1148,1150,1153,1155,1157,1160,1162,1164,1167,1169,1171,1173,1175,1177,1180,1182,1184,1186],{"class":327,"line":1095},16,[325,1097,383],{"class":331},[325,1099,340],{"class":386},[325,1101,389],{"class":339},[325,1103,525],{"class":335},[325,1105,528],{"class":398},[325,1107,402],{"class":335},[325,1109,360],{"class":335},[325,1111,407],{"class":363},[325,1113,367],{"class":335},[325,1115,343],{"class":335},[325,1117,1118],{"class":398}," template",[325,1120,402],{"class":335},[325,1122,360],{"class":335},[325,1124,828],{"class":363},[325,1126,367],{"class":335},[325,1128,343],{"class":335},[325,1130,1131],{"class":398}," data",[325,1133,402],{"class":335},[325,1135,336],{"class":335},[325,1137,1138],{"class":398}," order",[325,1140,402],{"class":335},[325,1142,360],{"class":335},[325,1144,1145],{"class":363},"#42",[325,1147,367],{"class":335},[325,1149,343],{"class":335},[325,1151,1152],{"class":398}," driver",[325,1154,402],{"class":335},[325,1156,360],{"class":335},[325,1158,1159],{"class":363},"Ann",[325,1161,367],{"class":335},[325,1163,343],{"class":335},[325,1165,1166],{"class":398}," eta",[325,1168,402],{"class":335},[325,1170,503],{"class":474},[325,1172,343],{"class":335},[325,1174,627],{"class":398},[325,1176,402],{"class":335},[325,1178,1179],{"class":474}," 0.2",[325,1181,354],{"class":335},[325,1183,354],{"class":335},[325,1185,567],{"class":339},[325,1187,370],{"class":335},[325,1189,1191,1193,1195,1197,1199,1201,1203,1205,1207,1209,1211,1213,1215,1217,1219,1221,1223,1225,1227,1229,1231,1233,1235,1237,1239,1241,1243,1245,1247,1249,1251,1253,1255,1257,1260,1262,1264,1266,1269,1271,1273,1275],{"class":327,"line":1190},17,[325,1192,383],{"class":331},[325,1194,346],{"class":386},[325,1196,389],{"class":339},[325,1198,525],{"class":335},[325,1200,528],{"class":398},[325,1202,402],{"class":335},[325,1204,360],{"class":335},[325,1206,407],{"class":363},[325,1208,367],{"class":335},[325,1210,343],{"class":335},[325,1212,1118],{"class":398},[325,1214,402],{"class":335},[325,1216,360],{"class":335},[325,1218,828],{"class":363},[325,1220,367],{"class":335},[325,1222,343],{"class":335},[325,1224,1131],{"class":398},[325,1226,402],{"class":335},[325,1228,336],{"class":335},[325,1230,1138],{"class":398},[325,1232,402],{"class":335},[325,1234,360],{"class":335},[325,1236,1145],{"class":363},[325,1238,367],{"class":335},[325,1240,343],{"class":335},[325,1242,1152],{"class":398},[325,1244,402],{"class":335},[325,1246,360],{"class":335},[325,1248,1159],{"class":363},[325,1250,367],{"class":335},[325,1252,343],{"class":335},[325,1254,1166],{"class":398},[325,1256,402],{"class":335},[325,1258,1259],{"class":474}," 4",[325,1261,343],{"class":335},[325,1263,627],{"class":398},[325,1265,402],{"class":335},[325,1267,1268],{"class":474}," 0.8",[325,1270,354],{"class":335},[325,1272,354],{"class":335},[325,1274,567],{"class":339},[325,1276,370],{"class":335},[258,1278,1279,1280,1283,1284,673,1286,673,1288,1291,1292,697,1294,697,1296,1298,1299,1302,1303,673,1306,673,1309,673,1312,1315,1316,1318,1319,1322,1323,1326],{},"A template takes the ",[322,1281,1282],{},"ActivityContent"," fields (",[322,1285,672],{},[322,1287,668],{},[322,1289,1290],{},"lockScreen",", the island\nregions, ",[322,1293,696],{},[322,1295,700],{},[322,1297,703],{},", …). Every string in it is\nresolved with ",[322,1300,1301],{},"data"," like a widget config: ",[322,1304,1305],{},"{{data.x}}",[322,1307,1308],{},"bind",[322,1310,1311],{},"when",[322,1313,1314],{},"repeat",". Fields\nset on the request itself override the template's (",[322,1317,672],{}," may then be omitted). The\ntemplate is kept in the shared store (",[322,1320,1321],{},"activity-template:{name}",", App Group on Apple);\n",[322,1324,1325],{},"registerActivityTemplate(name, null)"," removes it. Only the request as sent — template name\nplus data — counts toward 4 KiB. Starting with an unknown template fails on desktop; on\niOS \u002F Android the renderer shows what the request itself carries.",[771,1328,1330],{"id":1329},"setup","Setup",[258,1332,1333,1336,1337,1340,1341,1344,1345,1348,1349,1352,1353,1356,1357,1359,1360,1363,1364,1367,1368,1371,1372,1375],{},[706,1334,1335],{},"iOS."," Add ",[322,1338,1339],{},"TauriLiveActivity()"," to the extension's ",[322,1342,1343],{},"WidgetBundle"," (the ",[322,1346,1347],{},"init-ios","\ntemplate does) and ",[322,1350,1351],{},"NSSupportsLiveActivities = YES"," to the ",[706,1354,1355],{},"app's"," Info.plist (",[322,1358,1347],{},"\nadds it to ",[322,1361,1362],{},"project.yml","). With ",[322,1365,1366],{},"push: true"," the result has ",[322,1369,1370],{},"pushToken"," and an\n",[322,1373,1374],{},"activity-token"," event follows when it changes — send it to your APNs server.",[258,1377,1378,1381,1382,1385,1386,1389,1390,1393],{},[706,1379,1380],{},"Android."," On Android 13+ the app needs the ",[322,1383,1384],{},"POST_NOTIFICATIONS"," permission at runtime\n(for example ",[322,1387,1388],{},"requestPermission()"," of ",[322,1391,1392],{},"@tauri-apps\u002Fplugin-notification","). The plugin\ndeclares it in its manifest.",[258,1395,1396,1399,1400,1403,1404,1407,1408,1411,1412,1415],{},[706,1397,1398],{},"Desktop."," The island uses the built-in renderer; allow its window label in your\ncapability (",[322,1401,1402],{},"\"windows\": [\"main\", \"activity-*\"]","). On macOS enable the plugin feature\n",[322,1405,1406],{},"macos-private-api"," (and ",[322,1409,1410],{},"app.macOSPrivateApi: true",") for the transparent, rounded pill. An\nid started again while its ",[322,1413,1414],{},"endActivity(id, dismissAfterMs)"," delay runs stays on.",[771,1417,135],{"id":1418},"dynamic-island",[258,1420,1421,1422,1424],{},"On iPhone and on desktop the activity shows in a Dynamic-Island pill with compact, minimal\nand expanded regions; see ",[305,1423,135],{"href":136}," for the regions,\ndesktop placement and recordings.",[771,1426,1428],{"id":1427},"push-updates-ios","Push updates (iOS)",[1430,1431,1432,1460,1507],"ul",{},[1433,1434,1435,1438,1439,1441,1442,1445,1446,1449,1450,697,1453,1456,1457,491],"li",{},[322,1436,1437],{},"startActivity({ …, push: true })"," returns ",[322,1440,1370],{},"; rotations arrive through\n",[322,1443,1444],{},"onActivityTokens"," (",[322,1447,1448],{},"kind: \"activity\"","). Send ActivityKit pushes\n(",[322,1451,1452],{},"event: \"update\"",[322,1454,1455],{},"\"end\"",") with ",[322,1458,1459],{},"content-state: { \"json\": \"\u003CActivityContent JSON>\" }",[1433,1461,1462,1465,1466,1469,1470,746,1472,1475,1476,412,1479,673,1482,1485,1486,1489,1490,1493,1494,1496,1497,1500,1501,727,1504,1506],{},[706,1463,1464],{},"Push-to-start"," (iOS 17.2+): ",[322,1467,1468],{},"getActivityPushToStartToken()"," and ",[322,1471,1444],{},[322,1473,1474],{},"kind: \"pushToStart\"","). Your server starts an activity with ",[322,1477,1478],{},"event: \"start\"",[322,1480,1481],{},"attributes-type: \"TauriActivityAttributes\"",[322,1483,1484],{},"attributes: { \"id\": \"...\", \"group\": \"group.…\" }","\nand the same ",[322,1487,1488],{},"content-state",". The ",[322,1491,1492],{},"json"," must contain a filled ",[322,1495,668],{}," (send what\n",[322,1498,1499],{},"startActivity"," would send) or a registered ",[322,1502,1503],{},"template",[322,1505,1301],{},", at most 4 KiB.",[1433,1508,1509,1510,1513],{},"Android and desktop return ",[322,1511,1512],{},"null"," for push-to-start.",[771,1515,1517],{"id":1516},"ios-lifecycle-relevance-alerts-final-content","iOS: lifecycle, relevance, alerts, final content",[1430,1519,1520,1556,1563,1583,1594,1614],{},[1433,1521,1522,1525,1526,1529,1530,1445,1533,673,1536,673,1539,412,1542,673,1545,1548,1549,1529,1552,1555],{},[706,1523,1524],{},"Events."," Every activity the app sees (started here, in an earlier launch, or by\npush-to-start) reports ",[322,1527,1528],{},"activity-state"," ",[322,1531,1532],{},"{ id, state }",[322,1534,1535],{},"active",[322,1537,1538],{},"stale",[322,1540,1541],{},"ended",[322,1543,1544],{},"dismissed",[322,1546,1547],{},"pending",") — the user can end it from the Lock Screen — and\n",[322,1550,1551],{},"activity-content",[322,1553,1554],{},"{ id, content }"," when its content changes, pushes included.",[1433,1557,1558,1562],{},[706,1559,1560],{},[322,1561,741],{}," (number) decides which activity the Dynamic Island shows when\nseveral run (higher first).",[1433,1564,1565,1570,1571,1574,1575,1578,1579,1582],{},[706,1566,1567],{},[322,1568,1569],{},"alert: { title, body, sound? }"," on ",[322,1572,1573],{},"updateActivity"," lights the screen and shows\nthe alert; ",[322,1576,1577],{},"sound"," is ",[322,1580,1581],{},"\"default\""," or a sound file in the app bundle.",[1433,1584,1585,1589,1590,1593],{},[706,1586,1587],{},[322,1588,753],{}," (Unix ms): an update older than the last one applied is dropped\n(",[322,1591,1592],{},"applied: false","), so late network responses cannot roll the activity back. On iOS\n17.2+ it is also passed to ActivityKit.",[1433,1595,1596,1529,1599,1602,1603,1606,1607,1445,1610,1613],{},[706,1597,1598],{},"End with final content.",[322,1600,1601],{},"endActivity"," accepts the final ",[322,1604,1605],{},"content"," (shown until\ndismissed) and ",[322,1608,1609],{},"dismissalPolicy: \"default\" | \"immediate\"",[322,1611,1612],{},"dismissAfterMs"," wins when\nset; without either it is dismissed at once, as before).",[1433,1615,1616,1529,1619,1621,1622,1625],{},[706,1617,1618],{},"Frequent updates.",[322,1620,1347],{}," also sets ",[322,1623,1624],{},"NSSupportsLiveActivitiesFrequentUpdates",",\nwhich raises the hourly budget for push and local updates.",[1627,1628,1629],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":320,"searchDepth":373,"depth":380,"links":1631},[1632,1633,1634,1635,1636],{"id":773,"depth":373,"text":774},{"id":1329,"depth":373,"text":1330},{"id":1418,"depth":373,"text":135},{"id":1427,"depth":373,"text":1428},{"id":1516,"depth":373,"text":1517},"[object Object]","md",null,{},{"title":143,"description":1642},{"A running task outside the app":1643},"iOS Lock Screen and Dynamic Island, Android ongoing notification, desktop island.","CkO5WJ7nKKhF4V3MlJe01d7ugXYo6arz9Ny730ktSwc",[1646,1648],{"title":139,"path":140,"stem":141,"description":1647,"children":-1},"Buttons and links that reach your app, and taps that change the widget by themselves (local state).",{"title":147,"path":148,"stem":149,"description":1649,"children":-1},"Switch a widget to prepared layouts at set times, and animate what changes between them.",1794660587927]