Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Yeah, was gonna say that what was the problem with Android's Camera2 API...
Then I read about react-native...
I'm afraid I can't provide pointers to js bridge libs for Android, but maybe, if all you want is to scan a qr, you can just fire a camera intent and leverage whichever camera app the user has.
It's not ideal, I know, dice you don't get any control over whether the taken picture is decodable, etc, but personally, I'd take that in a heartbeat before JavaScript in my Android. -
At first I thought you were actually building android and not just some app. What a disappointment.
-
And thats why going with a crossplatform solution for an app that requires native features is a bad idea. Go back to the drawing board and proceed with building a native app, the use case doesnt seem that complex.
-
Encountered the same while building a scanner for the grocery store I used to work at.
Went with native-compiled because of the very shit that you're dealing with atm.
But if you're in a bind, you could use a react webview and call into QuaggaJS which does barcodes. Fuck if I can remember if it does QR but I'd be willing to bet something equivalent is floating around out there assuming you care to look. -
To those interested, finally got it working with teslamotors/react-native-camera-kit (actually that repo is quite well maintained, all bugs are tackled quickly and ferociously)
I _did_ have to back off to compile sdk 31, but that's another battle for another day...
Related Rants
hey... can I build a FUCKING android image that uses a camera library?
react-native-camera: deprecated, no longer maintained
react-native-vision-camera: it's like globalthermonuclear war with versioning and patches and support and splat splat bullshit in that repo, don't even dare look at the issues there, trust me, please
react-native-camera-kit: doesn't compile for targetSdk 33, no matter what the FUCK you do
jesus christ i want to scan a fucking QR code with my app and my gradle configs have turned into world war III where the fuck did we go wrong folks
rant
kill me
death
rage
🤡
clown
android
gradle
native