You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: explainer.md
+56
Original file line number
Diff line number
Diff line change
@@ -194,6 +194,62 @@ TBW: using description and screenshots.
194
194
## Theme color and background color
195
195
TBW...
196
196
197
+
## Adding shortcuts
198
+
Numerous operating systems grant native applications the ability to add menu items to the app icon itself. These often provide quick access to key tasks for an app. Typically, these are exposed via a right click, long tap, or a similar context menu-triggering action. For web applications, you can define aset of shortcuts to be exposed when the app is installed. Each shortcut item must have a name and a target URL. You may also include additional information, such as a shorter name, a description for the action, and one or more icons.
199
+
200
+
```JSON
201
+
"shortcuts": [
202
+
{
203
+
"name": "Play Later",
204
+
"description": "View the list of podcasts you saved for later",
205
+
"url": "/play-later",
206
+
"icons": [
207
+
{
208
+
"src": "/icons/play-later.svg",
209
+
"type": "image/svg+xml",
210
+
"purpose": "any"
211
+
}
212
+
]
213
+
},
214
+
{
215
+
"name": "Subscriptions",
216
+
"description": "View the list of podcasts you listen to",
217
+
"url": "/subscriptions",
218
+
"icons": [
219
+
{
220
+
"src": "/icons/subscriptions.svg",
221
+
"type": "image/svg+xml",
222
+
"purpose": "any"
223
+
}
224
+
]
225
+
},
226
+
{
227
+
"name": "Search",
228
+
"description": "Search for new podcasts to listen to",
229
+
"url": "/search",
230
+
"icons": [
231
+
{
232
+
"src": "/icons/search.svg",
233
+
"type": "image/svg+xml",
234
+
"purpose": "any"
235
+
}
236
+
]
237
+
},
238
+
{
239
+
"name": "Discover",
240
+
"description": "Browse for new podcasts to listen to",
241
+
"url": "/discover",
242
+
"icons": [
243
+
{
244
+
"src": "/icons/discover.svg",
245
+
"type": "image/svg+xml",
246
+
"purpose": "any"
247
+
}
248
+
]
249
+
}
250
+
]
251
+
```
252
+
197
253
## How can I detect if the user "installed" my app?
198
254
The spec provides a way for you to detect when the user installs your apps by registering for "appinstalled" events.
0 commit comments