How do I connect with firebase's real-time database, correctly?

0 favourites
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Hi all. I'm trying to create a textbox for people to write messages/clues in. Once they do, they can save/store it. Once saved, the messages are stored in a list, using local storage. The user can now, in real-time, choose difference messages and clues, coming in from all around the world!

    The problem is, I keep building and testing, on my two Samsung phones, to see if the real-time data storage is actually working between the two phones, but again, it's not working. It stores locally, but doesn't seem to be connecting with firebase's real-time database.

    Can someone please help? (I'm stuck on how to connect the database correctly.)

    This is what I've done, so far...

    dropbox.com/s/bsianj7iydep0di/Capture.JPG

    dropbox.com/s/7q5crw65jm2kzac/Capture2.JPG

  • Bump... Common. This is my last step. Once I figure out how to do this correctly, I can finally post my game on the Play Store! Please, guys, I really need some help.

  • Ashley can you please help me with my problem?

  • I have same problem bro

    First there was a link in GStrore that should generate code automaticly. I placed it into project then converted via Cocoon. But statistics didn't work.

    I dont know for whom are those official guides but ut they looks crazy.

  • I have same problem bro

    First there was a link in GStrore that should generate code automaticly. I placed it into project then converted via Cocoon. But statistics didn't work.

    I dont know for whom are those official guides but ut they looks crazy.

    Sorry to hear that marcinkowski ... Yeah, I'm clearly missing a piece of essential code. I was using this (https://www.scirra.com/tutorials/9500/how-to-use-firebase-realtime-db-in-depth-tutorial/page-2) tutorial, but it's not working.

    I asked Ashley to help, so... hopefully we can get some help.

  • Bump... Please... Someone.... Anyone! Ashley, can you please help us out?

  • Ughh.... PLEAASSE.... I REALLY NEED HELP... I KNOW IT'S AN EASY FIX... WHY IS NO ONE WILLING TO HELP WITH THIS?! I DON'T EVEN KNOW WHAT TO DO AT THIS POINT, BUT KEEP ASKING... For some reason, even Ashley won't respond.... I seriously don't get it.

  • guannstar

    I had some problems with firebase earlier. It said "Online" only the first time I enter my game. Then it just said "Offline". So i'm not sure if it's the same problem as yours.

    But in your code I don't see any actions which would save data after touching the button. You have to save it every time you update data. Also check rexrainbow's example on his official website

  • Thanks for responding! Which actions do I use to the save data after touching the button? I guess that's what I here trying to figure out... I didn't realize I needed to add that piece of code in. I would need some example or capx to figure out what I'm supposed to do.

  • guannstar

    Sorry that didn't respond for a long time

    Here's a very simple example with some comments.

    https://www.dropbox.com/s/5k7nl8r10b1dyho/firebase_itemtable_example.capx?dl=0

  • Thanks so much! Like this... dropbox.com/s/qfkpl5s64wg9ihp/Implimented.JPG Or do I need to add something else to those pieces of code you showed me?

  • guannstar

    No, that's all you need. Also you can put actions near to each other (in one condition). I just separated them to insert comments.

    And remember about firebase free account limits. If you are targeting on a big audience, first you should check another paid plans.

  • Thanks, again, friend! Can I change my account plan at a later date (if my app happens to do extremely well), or should I look for another paid plan now?

  • I'll let you know how everything goes (if the app works), tomorrow. Thanks, again!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • guannstar

    Well, probably the free plan will be enough for you for the first month, because usually you don't get a lot of popularity until some weeks were passed. At least this rule works for Google Play

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)