-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: organice pwa as share target #795
base: master
Are you sure you want to change the base?
Conversation
- added new route /capture, which lets the user select a capture template & target file (both parameters can be passed in the url) - upon submit, forward the user to the target file and trigger the capture process there - updated manifest, so the new capture route shows up at a share target in android (untested)
I'm not a maintainer here, but I think this would be a great feature! Unfortunately I have too many other things going on so I don't think I'll be able to contribute to this anytime soon, so hopefully someone else can. I could at least do some quick testing if/when this gets further along though. |
Hi @chasecaleb , I have deployed my branch on https://organice.24hoursparty.de/. Would you be open to install that page as PWA and see if sharing works for you? That would at least give us a hint if the missing share functionality is a issue with my phone or the code. |
Hi @tbruckmaier First, thank you for coming up with such a fantastic PR!🙏🏻 Unfortunately, I’m not an Android user myself, but I did install your deployed version to my iPhone to check if it would work there. According to https://caniuse.com/web-share, it just might. Having said so, I haven’t used any PWA as a share target yet. But I’d very much like organice to work like that(; Unfortunately, so far, I have had no luck with your installation. However, I also tried the Scrapbook PWA from your initial post, and it also didn’t show up as a share target. I tried finding out if I need to configure something somewhere but haven’t found anything so far. |
@schoettl or @branch14 Does the scrapbook share PWA show up as a share target on your Android phones? If so, does organice show up after installing from https://organice.24hoursparty.de/? |
Hi all, I just tried the sample PWA https://scrapbook-pwa.web.app/ on Android 10 and tried to share a photo. It doesn't show up as a share target :( I even tried a smartphone reboot. |
That’s really interesting. So… the official Google samples don’t work, but the API still exists. Curious. Thank you for checking it out @schoettl 🙏🏻 |
That is really strange, I have blamed the issue on my non-standard phone setup (quite old LineageOS 14 ~= Android 7, no google play services, root, Chromium instead of regular Chrome). @schoettl do you have a more regular setup? Also, is Chrome your default browser? (I think I have read someone having issues because of that). @munen If we cannot solve this issue, do you think the new /capture route is beneficial nevertheless? |
@tbruckmaier The demo video on https://mconverter.eu/ is pretty impressive. I'd love this workflow to be available on organice! I did try it (on my iPhone 13 pro) and it did not work. Having said so, they don't claim it should work on iOS(; That itself is not a blocker for inclusion to organice, of course. It only means I unfortunately cannot really help with the issue.
I mean, the sharing API seems to be a thing (we had the first draft PR in 2019). If anyone can get it to work, I'm all for pulling this in. If it won't work, then we can always leave the PR in a draft state for someone else to pick up later. Or do you see another possible use case for the |
Oh, I forgot that my default browser on Android is Firefox! Installing the demo app via Android Chrome works, now I've got the share target. I'll try organice.24hoursparty.de tomorrow... |
OK, I installed Organice from 24hours... as app in Chrome on Android 10. I can't sign in, Dropbox is not working and I can't get WebDAV working ATM, the docker test server is not reachable from other than localhost... although it should because it's bound to 0.0.0.0 But so far, Organice does not show up as share target. @tbruckmaier For which types of shares it's supposed to work? Webseites shared from browser? Files? |
@schoettl It makes sense that Dropbox won’t work (unless it’s been set up as an app). We could merge to develop and deploy to Staging for that. However, it should show up as a sharing target anyway, I suppose. @tbruckmaier Or should it only show up when logged in? |
@munen I "installed" organice from 24hoursparty.de via Chrome and Firefox on Android. I tried to log in via Gitlab, which did not work. "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method." Organice did not show up as a share target. But I might add Gitlab did recognize a login from a "new location" and notified me via email. |
@branch14 thank you for checking it out! That’s GitLab synchronization did not work is expected if OP did not set it up. However that should be independent of the shared target functionality. @tbruckmaier Seems we have no dice on the matter so far 😢 |
- maybe that part was missing for being used as share target?
- method is actually optional, but maybe browsers still expect it?
Thanks everyone for testing, what a pity that it still does not work. A last idea which came to my mind, maybe the integration does not work with the dynamically generated manifest (right now, the manifest is generated in JS dynamically instead of the regular I have deployed it to 24hoursparty.de again, would you all be so kind and test it again? @branch14 @schoettl Probably best to uninstall the PWA and reinstall it freshly. And if that does not work, as a last straw, could you have a look at the changed manifest code? Maybe it is a stupid typo or other issue which I somehow don't see? Regarding the login issues with dropbox and gitlab, I have not done anything special to that part of the code or the server setup. From my understanding, this should not interfere with the sharing part though.
Organice should show up when sharing regular text, so for instance the url from a browser (i think) |
I reinstalled the app from 27hours... and tried to share selected text, websites, and photos. No success, it doesn't show up :/ |
Alright, thanks for the feedback, I am officially out of ideas. @munen I leave it up to you what to do with this PR. Honestly, I will probably not be using organice a lot, since I mostly need something on the phone to capture notes, and will continue to use orgzly for that. I personally would prefer to have something like the |
@tbruckmaier It is a useful addition. I'm looking forward to seeing it work at some point. For the time being, before you give up on organice, let me introduce you to a feature that you might not now. I also capture stuff from the web using organice - even on the Desktop where I also have Emacs (and otherwise make extensive use of capture templates [for expenses, todos, meeting minutes,etc]). The feature I use for capturing is bookmarklets. Here's some documentation on it: https://organice.200ok.ch/documentation.html#bookmarklets It might be helpful for your use-case, it might not be. In any case, thank you for putting up a great effort. And maybe see you around at another point in time 🙏 |
For the moment, let's leave the PR here for someone to pick up at a later point in time and good luck to this future person! |
@munen Thanks for the tipp, that is indeed my backup plan, once firefox on mobile supports bookmarklets again ;) |
I believe they already do, and that issue was just not closed (will be closed after testing) |
Hi,
this WIP pull request aims to make organice show up as a share target on android, as described in #52
First of all, I cannot get any PWA to show up as share target on my phone, not even the sample PWAs like https://github.com/GoogleChrome/samples/blob/gh-pages/web-share/README.md#web-share-demo
That being said, I won't be able to finish this PR since I can neither use nor test it properly.
Maybe someelse wants to finish the PR though (there is not much left to do imo). Or maybe the new
/capture
page is useful on its own already.Implemented so far:
/capture
is implemented, which lets the user select capture template & target file (capture template settings are used here, e.g. which capture template is available in which files). Either one or both parameters can also be passed as URL parameters, the form is then populated with these valuescaptureVariable_
url parameters are forwarded through the process, so you can open the initial page/caputre?captureVariable_foo=bar
, select file & template interactively, and the capture variables are still used in the following capture processtitle
,text
,url
: these will be mapped into the capture variablesv_title
,v_text
,v_url
(see below for the strange variable names)TODOs
/capture
should be used as the share target, with thecaptureVaraible_*
parameters filled. I have added this already to the manifest, so it should work already. No idea why this does not work on my phone, but maybe someone else can test it.Some open questions / further ideas:
%u
or%t
get replaced before any custom variables (likecaptureVariable_url
/%url
), so there can be no capture variables starting with certain letter (for example%title
woiuld be replaced to[1970-01-01]itle
). Is that behaviour intended? Or am I doing something wrong? I have prefixed the capture variables withv_
meanwhile/capture
route, the capture process is directly triggered and the captured content saved to the file. Under some circumstances it could be preferable to show the capture popup and let the user change the captured content interactively