It's quite annoying that I am required to download a third-party QR scanner app - Not just any scanner app, either - just to add a device into my Syncthing.
Adding direct camera support through the Camera2 APIs shouldn't be too difficult to add, so why not do the logical thing and integrate a QR scanner into the app?
Good idea. Contributions are surely welcome.
I can't contribute myself, but in case you weren't aware; Google has an API for scanning QR codes that's built into Google Play Services.
See here - https://developers.google.com/vision/barcodes-overview
How would that work for the F-Droid build on non-Google Services devices?
The easiest approach would be to integrate https://github.com/zxing/zxing
I have "Barcode Scanner" installed from f-droid, which is exactly zxing, and I find the integration very smooth. The android way seems to be to use intents, rather than re-implementing everything in every app. But if the library is small and of course Free it doesn't really matter.
(Definitely it would be bad to introduce a dependency on non-Free libraries.)
I suppose we could do this, but I don't think it will make much of a difference. If there's an existing library we can use, and don't have to implement everything ourselves, then why not. However, I'm against using any proprietary API like Google Play Services.
Feature bloat? Please KISS.
Please note that barcode scanning is _optional_.
The Zxing Barcode Scanner works just fine
Please don't fix what's not broken.
Please don't introduce new dependencies that need to maintained.
@go2null just removed your duplicate comments
Thank you - was getting an error on mobile.
I say it is best to write your own QR scanner, it may be a bit of a hassle, and will require research, but in the long run it will be best. You do not have the risk of bloat, since you are the one that write it, therefore you make sure you don't bloat it. Furthermore, you don't have to worry about the developer of the library stopping, if this happens you end up writing your own anyway, or looking for another library with the same problems. Writing the library yourself seems like the best option to me.
It's a terrible idea, has reinventing bicycle ever been a good idea? Why would you want to do that to yourself? Let's waste hundereds of hours and reinvent our own HTTP library... If you get it to work, you can just lock down the library at that specific version.
I'm gonna close this as wontfix, because I really don't see the point.
My point is this: Why do you need a third-party app to act as a "bridge" to do these things, such as scan QR codes? You shouldn't need to. Furthermore, it's an extra step for the end-user to then go and download something else, something else that's not controlled by the Syncthing team and therefore not guaranteed reliable updates or future compatibility, to do the job.
It is much better to take the open-source script @capi mentioned earlier and implement it into the Syncthing app itself, as this way the development team will know for 100% certain that the code will work properly for the app and vice-versa. The code being the "zxing" java library and the app being "Syncthing for Android."
I prefer to follow the unix philosophy: Do one thing and do it well. We want to provide an app for file synchronization, doing things like QR code scanning as well is just a distraction, and we really don't have enough people to support that.
It's just an idea. :)
One thing I don't understand is why Syncthing only works with one single qr scanner (Barcode Scanner). I have installed another QR scanner from F-Droid and syncthing doesn't use it. Always is asking to install Barcode Scanner.
Which app is that?
I've asked for a unified scanner in the past on the Git. The problem here
is that there's not enough development man hours available to fully
integrate a new QR scanner when there's already one that works with the GO
code built and seeded in the Play Store.
I wish I had code experience to contribute.
On Aug 20, 2017 2:54 AM, "Felix Ableitner" notifications@github.com wrote:
Which app is that?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/syncthing/syncthing-android/issues/709#issuecomment-323567597,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJDWc_RsKQcYLI-xaTC82Z4ru-AHZuErks5sZ9gogaJpZM4JW9-v
.
Play Store
...and F-Droid
@ZJaume It seems that this app does not have the functionality to be launched from another app (I couldnt find any info on their Github). I suggest you open an issue on their repo and ask about this feature. We are using the zxing api, afaik this can also be implemented by other apps.
I'd advocate that despite adding new dependencies is something to not do too lightly, the best solution would be to integrate the ZXing library and use it from our own process. I agree that this is an optional feature, still I think it would be worth it.
What about the licensing, I'm no expert on this. Is it okay to merge code under another license, it was Apache commons I recall...? We could also use another app serving the zxing scan intent.
ZXing is Apache 2.0, Syncthing-Android Mozilla Public License 2.0. Since Apache allows MPL2 to be used in Apache projects, I'd assume, it's OK to use Apache library in MPL2. But I'm also not a lawyer.
Thanks, very cool to know:-). BTW the issue is no longer urgent according to the forum topic that barcode scanner is back.
Most helpful comment
I have "Barcode Scanner" installed from f-droid, which is exactly zxing, and I find the integration very smooth. The android way seems to be to use intents, rather than re-implementing everything in every app. But if the library is small and of course Free it doesn't really matter.
(Definitely it would be bad to introduce a dependency on non-Free libraries.)