snapdrop
snapdrop copied to clipboard
Implement sharing though native Android share sheet
This is less of a bug report and more of a feature request. To my limited knowledge, it is actually possible to make a PWA integrate with native share dialogs of e.g. Android and iOS. For example, the Twitter PWA is implementing this functionality. Would we great if this could be implemented in the future!
Until it is implemented, you might want to use the android client. See https://github.com/fm-sys/snapdrop-android
Thanks a lot for the tip, this works great! However, ultimately I would prefer to see this feature implemented in the PWA, especially since Snapdrop is a prime example of what should be implemented as a PWA. However, given the existence of this app, I understand that such an implementation is not a top priority.
Just researched a bit, and PWAs do support share target support, here are some resources about it:
- https://mconverter.eu/blog/web_share_target_api/
- https://web.dev/web-share-target/
- https://web.dev/web-share/
Unfortunately, iOS doesn't seem to support PWAs properly so this won't work for iPhones...
@hep-mh Has been implemented since last year, maybe even 2020.
@hello-smile6 Are you sure? Does not work on any of my three Android devices. Only way to do it is via the dedicated Android app.
At the moment, only text/URL sharing seems to be implemented in Snapdrop. https://github.com/RobinLinus/snapdrop/blob/a96dde25c07478684cf95878c031d7613ceaf9fd/client/manifest.json#L31-L39 https://github.com/RobinLinus/snapdrop/blob/a96dde25c07478684cf95878c031d7613ceaf9fd/client/scripts/ui.js#L501-L518
To be able to share files to Snapdrop through Android share sheet, changes mentioned by @xpire should be implemented (modifying share target in manifest.json and adding a handler to the code). Keep in mind, though, that the spec is currently in the draft stage (and seems to only be implemented by Chrome) and might thus get changed in the future.