5 ms·
I was wondering how reddit accessed my native device share functionality when you pressed the “share” button on a post, turns out it was a JS API
by rareitem 4y ago
I was wondering how reddit accessed my native device share functionality when you pressed the “share” button on a post, turns out it was a JS API
- dspillett 4y agoLooking a bit deeper there is the reverse option if you have you code registered as an installed PWA, allowing you app to be a share target without being a native app. Could be useful for a couple if things I might tinker with at some point.
- tiagod 4y agoI thought I was familiar with the APIs in the article, but I didn't know that! Thanks, going to check it out.
- jeroenhd 4y agoThis would be great for web apps like photopea!
- djbusby 4y agoI made one of these web-based Android share target things. I found the JS API a little tough but now all of my on-phone apps can share into my custom thing (a personal KB) Edit: it's cool and fun, nice weekend project.
- s4i 4y agoI used this to more easily share links to HN when I'm on the phone (only works on Android for now though). [1] [1] https://samulisuomi.github.io/share-to-hn-pwa/ https://samulisuomi.github.io/share-to-hn-pwa/
- thrdbndndn 4y agoSemi-funny story: I was still using Win7 at the time and the share button from a browser extension crashes itself due to not handling non-support system properly. This is how I learnt that even desktop operating system (Win10 in this case) nowadays has share feature.