@ConfuSomu @bookwyrm we are using QuaggaJS to do the detection in browser using the camera API, yes! https://github.com/ericblade/quagga2
@storydragon @ConfuSomu @bookwyrm I'm wondering if you can reproduce the issue on the quagga2 example page: https://serratus.github.io/quaggaJS/examples/live_w_locator.html --if so would be best to report a bug there I think. Though I imagine also reporting it on the bookwyrm issue tracker would be a good idea.
@storydragon @ConfuSomu @bookwyrm also, if this is for an Android app I also wonder if there is a way to do barcode scanning more natively. If you can find a way to scan the isbn as a number natively, all you'd need to do is pass that into the search API to get the same functionality as the website.
@vv
Well, it seems like the quagga2 example page works... So that makes it probable that the problem is with the implementation in Bookwyrm...
And yeah, I have been thinking about trying to find a way to do barcode scanning in another way, but I will have to search for that. So that will be another weekend.
It is probably possible, I 'just' have to try to see how to do it.
@bookwyrm
@storydragon @bookwyrm probably a way to fix it on our side, then. I'll need a lot more info about how it's failing though
@vv
Saturday I spent quite some hours on adding ISBN scanning to the app. After five hours or more I finally got it working. Though the appearance could probably be better.
Maybe I should try to see if I can detect the ISBN scan button on instances that have them, to be able to remove it to prevent confusion.
I basically used JavaScript to add a button at the top of the page, connected to a function within the app code, to scan for a barcode.
https://github.com/PrivacyDragon/Bookwyrm_Android/blob/main/app/src/main/java/nl/privacydragon/bookwyrm/StartActivity.java#L143
@bookwyrm
@storydragon Pretty neat! I'm wondering how this differs from making bookwyrm a Progressive Web App which might be useful (as a contributor rather than a project owner, I'm just spitballing here)
@vv
Ugh. It seems like I cannot get the camera working in an Android Webview client (And yes, if I did not make any mistakes, I did all the permission stuff.). I am not sure whether that is an issue with QuaggaJS or with your implementation?
I have spent quite some hours...
@ConfuSomu @bookwyrm