Using a QR code to retrieve specific data from a database

I am building a mobile app for my Computer Science IA (Part of my school’s IB program), and I’m encountering a logistical problem I don’t know enough about to answer on my own.

I want to make it so that when the app scans a specific QR code, it’ll pull specific information from the real-time database provided by Firebase and display it in the app. I already have some test data that I imported into the database from Google Sheets but I have no idea how I would go about getting a QR code to tell the database to do something like that.

I know they usually contain URL’s and that’s all I’ve been able to find people discussing in regards to uses for QR codes but not much beyond that.

Any help anyone can provide would be greatly appreciated.

You can store all sorts of data in a QR code but typically it’s a URL or plain text.

So, if I understand correctly, you want the user to scan a QR code and, for example, if the QR code returns the result “Pizza” then you’ll get the “Pizza” section of the Firebase data?

Do you have a sample QR code you can post?

You can use the barcode scanner in Thunkable to retrieve the value stored in the QR code:

https://docs.thunkable.com/barcode-scanner

Hold on I think I just thought of a solution. I think just having the code contain plaintext of a title and then making an “if-then” statement to test if what it scans matches to a bucket in my database would work. What do you think?

Yes, you could definitely do that.