I copied an example from a YouTube video and got this barcode reader working on my phone.
My issue is I’m literally cutting and pasting the code without knowing how java works.
So far I’ve been able to google the errors to get the app working and transferred from my local host to my phone but I don’t know what to google anymore.
I want to take that number the barcode reader is getting and use it to fill out a rest API from open food facts that would looks something like this in bash:
Then I want to curl the json blob and get the ingredients object.
Once I have the ingredients, I want to diff that against a list of known allergens and return a response to the screen of something like “You are allergic to this” or “You are not allergic to this.”
Here’s a link to my repo and there’s some commented code where one my my friends suggested using URL, but I haven’t had the chance to try that yet.
Here’s a link to stack overflow where I described what I’m trying to do.