Web Share Target API Integration
Register your PWA as a target for web content shared from other apps. Accept images, audio, text, links. Progressier simplifies the implementation by a factor of 10.
Share to... your PWA
With the Web Share Target API, an installed PWA can register with the underlying operating system as a target to receive shared content from other apps. While the standard implementation is complex, with Progressier it's two inputs, an event listener and a platform-agnostic API.
Platform-agnostic event listener
Add an event listener to your app's code. Whenever content is shared, Progressier fires an event with the details of content. There are only four parameters:
file. Get the content from there and do something with it.
Example use cases
A Twitter-like PWA could create a draft with
titleas title of the post, and use the
textas body of the app.
An audio player could retrieve the audio file shared in
fileand play it instantly.
An image editor could use the photo shared in
fileto open their editing workflow and use
titleas the title of the document.
Accept links, text & files
Effortlessly specify the kind of files you want your PWA to be eligible to receive: links? text content? images? a specific image type, e.g. GIF? audio? videos? PDFs? Progressier displays a list of file formats you can choose from — we take care of setting everything up correctly in your app manifest and service worker.
No complicated integrations
Google's article about the Web Share Target API does a good job at explaining how the API works. However, it also highlights the difficulty in implementing it correcting in your PWA. If you want to receive both links and files, you'll need to handle both GET and POST requests. You'll need to write service worker code, which is hard to debug. And you'll need to account for the
urlparameter not being available on Android. Progressier takes care of all the implementation details on your behalf. Progressier is compatible with WordPress, React, Vue.js, Bootstrap, jQuery.