[GH-ISSUE #252] Receive links shared from others apps using PWA Web Share Target API #3035

Closed
opened 2026-04-13 11:34:07 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @ni554n on GitHub (Nov 22, 2023).
Original GitHub issue: https://github.com/imputnet/cobalt/issues/252

Cobalt is the perfect app to use this API and it's pretty straightforward to implement. Currently, it only supports Chrome-based browsers, but as it'll save several clicks, I think it's worth it to consider.

Receiving shared data with the Web Share Target API
Share data between apps
manifest.share_target

Originally created by @ni554n on GitHub (Nov 22, 2023). Original GitHub issue: https://github.com/imputnet/cobalt/issues/252 Cobalt is the perfect app to use this API and it's pretty straightforward to implement. Currently, it only supports Chrome-based browsers, but as it'll save several clicks, I think it's worth it to consider. [Receiving shared data with the Web Share Target API](https://developer.chrome.com/en/articles/web-share-target/) [Share data between apps](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/How_to/Share_data_between_apps) [manifest.share_target](https://developer.mozilla.org/en-US/docs/Web/Manifest/share_target)
Author
Owner

@wukko commented on GitHub (Nov 22, 2023):

receiving doesn't work for anything but android chrome, but even then their own sample pwa never worked properly on my android phone. i would love to do it, but it's simply impossible for now :(

<!-- gh-comment-id:1822929482 --> @wukko commented on GitHub (Nov 22, 2023): receiving doesn't work for anything but android chrome, but even then their own sample pwa never worked properly on my android phone. i would love to do it, but it's simply impossible for now :(
Author
Owner

@Mattis142 commented on GitHub (Mar 16, 2024):

I know I have said this before on Twitter but maybe it'd be better on here for tracking requests but could you please check again if it works for you now? because the demo they supplied certainly works for me

Android 14 (AP21.240216.010)
Chrome version 122.0.6261.119
Webview Version 123.0.6312.40 (631204042)

if you throw a URL at it, it simply works
Screenshot_20240316-203904
Screenshot_20240316-203826

<!-- gh-comment-id:2002102363 --> @Mattis142 commented on GitHub (Mar 16, 2024): I know I have said this before on Twitter but maybe it'd be better on here for tracking requests but could you please check again if it works for you now? because the demo they supplied certainly works for me Android 14 (AP21.240216.010) Chrome version 122.0.6261.119 Webview Version 123.0.6312.40 (631204042) if you throw a URL at it, it simply works ![Screenshot_20240316-203904](https://github.com/wukko/cobalt/assets/40364718/fff7af51-e578-4ea5-abd5-88b4d5852c08) ![Screenshot_20240316-203826](https://github.com/wukko/cobalt/assets/40364718/c7ff3a10-1fd3-4679-9d07-657c7c55a665)
Author
Owner

@yerrak00 commented on GitHub (Mar 26, 2024):

@wukko I was able to get it to work with my phone and PC, I opened up PR #404 for it.

One thing I found weird was how Chrome on Android sends the URL via the text field, whileas Edge on Windows sends the URL via the URL field in the share body, so in the manifest I just mapped both fields to the u query parameter, so that we always get one value or the other when sharing to cobalt.

<!-- gh-comment-id:2019344676 --> @yerrak00 commented on GitHub (Mar 26, 2024): @wukko I was able to get it to work with my phone and PC, I opened up PR #404 for it. One thing I found weird was how Chrome on Android sends the URL via the text field, whileas Edge on Windows sends the URL via the URL field in the share body, so in the manifest I just mapped both fields to the `u` query parameter, so that we always get one value or the other when sharing to cobalt.
Sign in to join this conversation.