[plugin] firebase

From the Asset Store
Firebase Analytics
$2.80 USD
30% off
Firebase Analytics Web App, ( Firebase SDK version 10.0.0 )
  • Update

    Change field name "userID" to "ownerID" in rex_parse_timer plugin.

    It will break current project, user might export table, change key name "userID" to "ownerID" then import this new content manually in dashboard. Or remove whole table then restart.

  • rexrainbow

    firebase_timer plugin throws an undefined error on Timer.Remove action

  • xoros

    Thanks, I had fixed it. Please download and try again.

  • thank you!

  • rexrainbow

    about disconnection event handlers: if you pass a variable value or any value that can change onDisconnect handler and after that variable changed, the old variable is saved to the database on disconnection instead of a new value. Is it possible to update the passed value on disconnection? I assume the variable value stored somewhere and not gets updated

    Example

    ->on start of layout add disconnect handler with variable value (5)

    ->change variable to 12

    -> disconnect saves 5

  • Try Construct 3

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

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

    See this sample capx of "onDisconnect". Set onDisconnect handler under first reading callback -

    + on start of layout

    • add receive callback: "xxx" once ( read at a specific reference. This action will initial a connection to server. )

    + on receive "xxx" ( now connected )

    • disconnect saves 5
  • Hmm, the thing I want to achieve is that it saves updated values on disconnect. And now it saves the values which were on "start of layout".

  • xoros

    Call "Action:Set value" under "On disconnect" category.

    Note that there are another two "Action:Set value" under "Send - Set" and "Send - Transaction" category.

  • That's exactly what I am doing. But it saves old values from the dictionary on disconnect. I assume it stores the value from the dictionary on callback and does not update it.

    May be it's not even possible the way I am trying to do that.

  • xoros

    Try this Sample capx

  • I modified your example in order to show what I want to achieve. If I change the variable value after I set a callback, it saves the old value on disconnect.

    https://www.dropbox.com/s/7pgqt6r0jzpap9h/set%20value%20on%20disconnect1.capx?dl=0

  • xoros

    I dump variable "Var" on console, it shows 10, so it saves 10 while disconnect.

    The problem is that the sequence of calling "on receive" event is controlled by firebase api. I am not sure it will be called instantly or later. In this case, it had been called instantly

    You might have another private variable to store disconnect-save value independently.

  • Yes, I think its coming from the server and refers to the value called instantly on start of the layout. I might try C2's browser event on "going offline".

    What do you mean by another store on disconnect private variable?

    If I call on disconnect set value each time the variable changes, will something be trigger on the server each time or only when I disconnect? It's difficult to explain ))

  • xoros

    "only when I disconnect". The setting value of onDisconnect will be overwrote I guess.

  • So it's ok to call it every time? It will not create server traffic?

    How does exactly onDisconnect work? It saves the value locally and the server listenes to on disconnect and than when user disconnects from firebase calls this stored value from client side?

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