Firebase URL Change to Default automatically

So i uses 3 Firebase on 1 Screen and I need a Little help whenever I Reopen MIT app inventor my 2 Firebase url & Token automatically changes to default don’t know why & 1 remains same

Just done a test, not seeing that behaviour here....all three FB components retain their settings on a reload

OK I don’t know what it was but can you help me with 1 more matter
I am creating a login & signup system with refer system
So when a new user login with old users Refer code old user will get +30 in his total Balance but problem is that when new user uses a refer code, it adds 30 in refer code not in balance
Hope you understand but here I attacked Firebase & blocks pic

I use number as a refer code

Old value was 50 but instead of 80 value became Number+30

Don't really know. If anything was going wrong it could be here:


but it shouldn't matter whether value is a string or a number AI2 will treat it as a number and add the 30. If it really is a string, the AI2 would generate an error and not try to concatenate the two items...

When I only use get Value them it’s Shows could not add “” 30
But when I use this if them it works

That is correct, you cannot add to a "null" value. Check what you get when you do the addition, and check what the value of BALANCE looks like.

I have a much complicated version of login system witch I have developed. Witch uses less firebase database bandwith also it has an flexible refer system. If you like I can modify the code for you to understand so you can learn how to minimize data bandwidth and don't get any errors.

It would help a lot if you do so
but I am getting another issue when I add a Value in Balance
It’s gives an error

Code here

The problem is that the value store in database is written with Double quotes

So how am I gonna able to add a value?

Can you show the full data structures of firebase database.


Ok let me make the simpler Blocks for you to understand. I'm using phone to complete these blocks so it may take some time hope you can wait a little.

Yep I can wait

It's complete just let me test it and then post the aia here

Ok waiting

One more thing I'm not going to add the token and url. You can add yours if you don't mind. Also I'm going to post a file for the database so you can understand how I configure it.

Login and Register System With working Referral System.

Aia :- Test.aia (6.7 KB)

Json File for firebase database :- test-base-98340-default-rtdb-export.json (105 Bytes)

Making this in a phone from the scratch is quite head scratcher tho

1 Like

So I also have to make these in my real database?

I don’t know much about database

Yes the main section is for all the user data and the refer is for identifying the refer code that user have entered.

It's bit complicated but you'll understand it. Also this system is created by me so it is not going to have any bugs.