Closed andreban closed 4 years ago
Thanks for submitting a new feature request! I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future.
We'd be glad to support this. Especially since Microsoft was the driver in getting shortcuts into the app manifest standard. 😊
I understand Chromium Canary supports shortcuts on desktop now, too, so it seems this feature is picking up steam.
Here's how the implementation on Bubblewrap looks like to generate the markup it consumes: https://github.com/GoogleChromeLabs/bubblewrap/blob/master/packages/core/src/lib/TwaManifest.ts#L207-L234
Happy to extract that to a separate method if you'd like to re-use.
For info, I'd love to mention PWABuilder in https://web.dev/app-shortcuts/#trusted-web-activity-support
@beaufortfrancois By all means, please do... once we get app shortcut support in. I'll see if I can make this happen today.
@JudahGabriel Let me know when it's done and I'll update the article. Yeah!
I've submitted a PR for this: https://github.com/pwa-builder/PWABuilder/pull/775
I've noticed app shortcuts are displayed as "Object" in https://www.pwabuilder.com/generate.
You can try it by entering https://app-shortcuts.glitch.me/ in https://www.pwabuilder.com/
I'm not sure if it's deployed yet as I'm getting a 500 HTTP Server Error when trying to generate a TWA for this website. WAI?
Updated: It is not returning a 500 HTTP Server Error today, but still no app shortcuts in the TWA APK file.
Hang tight - we're ironing out some hanging issues. We'll update here when it's ready.
OK folks, thanks for the wait. We've got all the pieces in place for this, and it's deployed to preview.pwabuilder.com. We'll publish this update to production as part of a larger rollout in mid June.
@JudahGabriel What is the current status?
We just deployed support for shortcuts this morning. 😎
To see it in action:
The resulting package will have shortcuts enabled on Android:
Thank you @JudahGabriel I'm updating web.dev article at https://github.com/GoogleChrome/web.dev/pull/3384
Thank you!
Web App Manifests support a shortcut field that can be used to generate shortcuts on the app launcher. Those shortcuts can be implemented in applications using Trusted Web Activity via Android App shortcuts.
Bubblewrap has support for shortcuts, but when PWABuilder invokes the APK generation on CloudAPK, the shortcuts item is sent as empty.
The Manifest file for https://sadchonks.com/ contains app shortcuts. When generating the app via PWA Builder, the
shortcuts
field is an empty string:The
shortcuts
section generated by Bubblewrap looks like the following: