Problem with FirebaseDB

I’m developing an app that reads and writes to a firebaseDB. This is pretty simple, and I follow all the procedures that the tutorials offer, but when i press the button that should upload information to the server, nothing happens, the database still appears as null. I have no idea why no information gets uploaded to it.

Please show your relevant blocks

image

I have the correct database url up there.
I did change the token, but the original one didn’t show anything anyway.

In the designer properties for FirebaseDB1 you should have the following:

Token
eyJ0eXAiOiJKV1QiLCJh…bAxA
(which is your API key found in firebase Console)

Url
https://[PROJECT_ID].firebaseio.com/
(which is your database url found in firebase Console)

ProjectBucket
< your project bucket >
(the level where your data will be stored)

On firebase, check that your rules are read:true and write:true (for development)

Yes I have all of that correct. Done exactly like that. The rules are also set to true.

I attempted to change the rules to false, then reopened my app, I have the error block set up with a notifier. No error appears the app works normally, does this mean my app isn’t connecting?

Is there an specific way that you are supposed to run the app, or emulate it. I’m running it on my regular android phone.

Are you having to compile the app or are you using the companion app ?

I compile the app.

http://appinventor.mit.edu/explore/ai2/setup-device-wifi

You can get the link from the AI2 interface, click on Help then companion information to get a qrcode for the companion app

My ususual procedure is, create an apk file for my computer. Save it on a cloud, then install the app to my phone by accessing the cloud and selecting the apk file.

Does it only work with the companion app?

No it works with companion and compiled, using the companion app means real time live testing, much quicker…especially when compared to what you are doing :wink:

Correct, but shouldn’t the firebaseDB still work if the app is compiled?

Have you tried using Firebase with the MIT default settings? Does that work with your blocks?

Yes, of course...

So yes, the app works as it should with the default. But since I want the app to communicate to a separate device in the long term, I need the data to be displayed in the database, and I don’t know why it doesn’t.

OK.

In your firebase console, add a key:value pair (tag and value) to replicate an entry you would make with your two textboxes.

Then in your app, use the firebase getvalue block to call the tag and get the value.

Does that work? If so it means that you are connected correctly to firebase. If not there is something wrong with your connection to firebase…either at the app end or the firebase end.

For example, if my project bucket is called myprojectbucket:

image