Realtime Database for all platforms - Firebase

Not yet. iOS and Android versions are done and tested in 100%. I’m thinking about releasing mobile version as Early Access.

Database Core

Initialization

Before making any call to the Firebase Realtime Database, first, you should execute the Firebase Database Init function. If the result is a fail, study logs to find out what causes an issue.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki5.png

Permissions

The Realtime Database provides a declarative rules language that allows you to define how your data should be structured, how it should be indexed, and when your data can be read from and written to. By default, read and write access to your database is restricted so only authenticated users can read or write data. To get started without setting up Authentication, you can configure your rules for public access. This does make your database open to anyone, even people not using your game, so be sure to restrict your database again when you set up authentication. If you do not want to use public access you can add Firebase Authentication to your app to control access to the database.

Go Online/Offline

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki6.png

You can manipulate whether your game is connected to the Firebase Realtime Database or not.

  • Go Online – Resumes the connection to the Firebase Realtime Database backend after a previous Go Offline call.
  • Go Offline – Shuts down the connection to the Firebase Realtime Database backend until Go Online is called.

Purge Outstanding Writes

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki7.png

This function purges all pending writes to the Firebase Realtime Database server.

Database Reference

Database Reference represents a particular location in your Database and can be used for reading or writing data to that Database location. This class is the starting point for all Database operations. After you’ve initialized it with a URL, you can use it to read data, write data, and to create new Database Reference instances.

Get Reference

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki8.png

You can get Database Reference using one of three available functions:

  • Firebase Database Get Reference – get a Database Reference to the root of the database.
  • Firebase Database Get Reference From Path – get a Database Reference for the specified path.
  • Firebase Database Get Reference From URL – get a Database Reference for the provided URL, which must belong to the database URL this instance is already connected to.

Tree manipulating

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki9.png

For more flexible tree manipulating you can use the following functions instead of paths or URLs:

  • Child – gets a reference to a location relative to this one.
  • Get Parent – gets the parent of this location, or get this location again if Is Root.
  • Get Root – gets the root of the database.
  • Is Root – returns true if this reference refers to the root of the database.
  • Key – gets the string key of this database location.
  • Url – gets the absolute URL of this reference.

The above example is an equivalent of path /users/eclarke and URL https://fir-gamedna.firebaseio.com/users/eclarke.

This is a joke right? Where did this functionality go in the Ultimate Mobile Kit? Pulling the text and advertisement for it from the self pages doesn’t mean it wasn’t there when I bought the pack. Are we getting a rebate for the false advertisement?

Hi KillerSneak,

Realtime Database never hasn’t been advertised as part of Ultimate Mobile Kit. We have splitted Firebase functionality to separate plugins since start of development. Ultimate Mobile Kit - features for mobile only and Realtime Database - features for all platforms. For confirmation you can check start date of forum threads for Ultimate Mobile Kit (03-05-2017, 06:15 PM) and Realtime Database (03-05-2017, 08:40 PM). It was announced at the same day. “Realtime Database” words have never been used on the advertisement images of Ultimate Mobile Kit. We thought that it was clear. We announced two plugins at the same time to eliminate doubts. We are very sorry that it was still misunderstood :frowning: Check your PM box, we sent you more details.

Variants

Firebase Variant is a main data type for Firebase platform and is used instead of multiple standard types such as: integer, float, string, bool, arrays, maps, etc.

Construct Variant

Construct Variant functions create and return a new Variant from provided data type.

  • Construct From Bool – return a Variant from a boolean.
  • Construct From Float – return a Variant from a floating point number.
  • Construct From Integer – return a Variant from an integer number.
  • Construct From String – return a Variant from a string.
  • Construct Empty String – get an empty string variant.
  • Construct Empty Array – get a Variant containing an empty array.
  • Construct One – get a Variant of integer value 1.
  • Construct Zero – get a Variant of integer value 0.
  • Construct Zero Point Zero – get a Variant of double value 0.0.
  • Construct One Point Zero – get a Variant of double value 1.0.
  • Construct True Object – get a Variant of bool value true.
  • Construct False Object – get a Variant of bool value false.
  • Construct Empty Map – get a Variant containing an empty map.
  • Construct Null – get a Variant of type Null.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki10.png

Convert Variant

You can Convert Variant from one data type to another.

  • As Bool – get the current Variant converted into a boolean.
  • As Float – get the current Variant converted into a floating-point number.
  • As Integer – get the current Variant converted into an integer.
  • As String – get the current Variant converted into a string.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki11.png

Check Type

You can get and check current Variant type using below functions:

  • Type – get the current type contained in this Variant.
  • Is Array – get whether this Variant contains a vector.
  • Is Map – get whether this Variant contains a map.
  • Is Null – get whether this Variant is currently null.
  • Is Static String – get whether this Variant contains a static string.
  • Is Mutable String – get whether this Variant contains a mutable string.
  • Is String – get whether this Variant contains a string.
  • Is Integer – get whether this Variant contains an integer.
  • Is Float – get whether this Variant contains a float.
  • Is Numeric – get whether this Variant contains a numeric type, integer or float.
  • Is Bool – get whether this Variant contains a bool.
  • Is Fundamental Type – get whether this Variant contains a fundamental type: null, integer, double, bool, or one of the two string types.
  • Is Container Type – get whether this Variant contains a container type: array or map.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki14.png

Get Value

  • Bool Value – accessor for a Variant containing a bool.
  • Float Value – accessor for a Variant containing a float.
  • Integer Value – accessor for a Variant containing an integer.
  • String Value – accessor for a Variant containing a string.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki12.png

  • Array Value – accessor for a Variant containing an array of Variant data.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki15.png

  • Map Value – accessor for a Variant containing a map of Variant data.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki16.png

Set Value

  • Set Bool Value – sets the Variant to the given boolean value.
  • Set Float Value – sets the Variant to a double-precision floating point value.
  • Set String Value – sets the Variant to a copy of the given string.
  • Set Integer Value – sets the Variant to an integer value.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki13.png

  • Set Array – sets the Variant to a copy of the given array.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki17.png

  • Set Map – sets the Variant to a copy of the given map.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki18.png

Read Data

Retrieve Data

You can use the Get Value method to read a static snapshot of the contents at a given path once. The task result will contain a snapshot containing all data at that location, including child data. If there is no data, the snapshot returned is null.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki19.png

When query is completed, you can call Value on downloaded Data Snapshot:

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki20.png

You can manipulate database tree in downloaded Data Snapshot using child nodes:

  • Has Child – does this Data Snapshot contain data at a particular location?
  • Child – get a Data Snapshot for the location at the specified relative path.
  • Has Children – does this Data Snapshot contain any children at all?
  • Children – get all the immediate children of this location.
  • Children Count – get the number of children of this location.
  • Exists – returns true if the data is non-empty.
  • Key – get the key name of the source location of this snapshot.
  • Priority – get the priority of the data contained in this snapshot.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki21.png

Sorting Data

To retrieve sorted data, start by specifying one of the order-by methods to determine how results are ordered:

  • Order By Child – order results by the value of a specified child key.
  • Order By Key – order results by child keys.
  • Order By Value – order results by child values.
  • Order By Priority – order results by child priorities.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki22.png

The call to the Order By Child method specifies the child key to order the results by. In this case, results are sorted by the value of the price value in each child.
You can only use one order-by method at a time. Calling an order-by method multiple times in the same query throws an error.

Filtering Data

To filter data, you can combine any of the limit or range methods with an order-by method when constructing a query.

  • Limit To First – sets the maximum number of items to return from the beginning of the ordered list of results.
  • Limit To Last – sets the maximum number of items to return from the end of the ordered list of results.
  • Start At – return items greater than or equal to the specified key or value depending on the order-by method chosen.
  • End At – return items less than or equal to the specified key or value depending on the order-by method chosen.
  • Equal To – return items equal to the specified key or value depending on the order-by method chosen.

Unlike the order-by methods, you can combine multiple limit or range functions. For example, you can combine the Start At and End At methods to limit the results to a specified range of values.

Even when there is only a single match for the query, the snapshot is still a list; it just contains a single item.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki23.png

How query data is ordered

Order By Child

When using Order By Child, data that contains the specified child key is ordered as follows:

  • Children with a null value for the specified child key come first.
  • Children with a value of false for the specified child key come next. If multiple children have a value of false, they are sorted lexicographically by key.
  • Children with a value of true for the specified child key come next. If multiple children have a value of true, they are sorted lexicographically by key.
  • Children with a numeric value come next, sorted in ascending order. If multiple children have the same numerical value for the specified child node, they are sorted by key.
  • Strings come after numbers and are sorted lexicographically in ascending order. If multiple children have the same value for the specified child node, they are ordered lexicographically by key.
  • Objects come last and are sorted lexicographically by key in ascending order.

Order By Key

When using Order By Key to sort your data, data is returned in ascending order by key.

  • Children with a key that can be parsed as a 32-bit integer come first, sorted in ascending order.
  • Children with a string value as their key come next, sorted lexicographically in ascending order.

Order By Value

When using Order By Value, children are ordered by their value. The ordering criteria are the same as in Order By Child, except the value of the node is used instead of the value of a specified child key.

Save Data

Basic write operations

For basic write operations, you can use Set Value to save data to a specified reference, replacing any existing data at that path. You can use this method to pass types accepted by JSON through a Variant type which supports:

  • Null (this deletes the data)
  • Integers (64-bit)
  • Floating point numbers
  • Booleans
  • Strings
  • Arrays of Variants
  • Maps of strings to Variants

Using Set Value in this way overwrites data at the specified location, including any child nodes. However, you can still update a child without rewriting the entire object:

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki24.png

You can set priority of the database field which controls its sort order relative to its siblings.

In Firebase, children are sorted in the following order:

  • First, children with no priority.
  • Then, children with numerical priority, sorted numerically in ascending order.
  • Then, remaining children, sorted lexicographically in ascending order of their text priority.

Children with the same priority (including no priority) are sorted by key: A. First, children with keys that can be parsed as 32-bit integers, sorted in ascending numerical order of their keys. B. Then, remaining children, sorted in ascending lexicographical order of their keys.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki25.png

It’s possible to set value and priority in one function call:

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki26.png

Append to a list of data

Use the Push Child method to append data to a list in multiuser applications. The Push Child method generates a unique key every time a new child is added to the specified Firebase reference. By using these auto-generated keys for each new element in the list, several clients can add children to the same location at the same time without write conflicts. The unique key generated by Push Child is based on a timestamp, so list items are automatically ordered chronologically.

You can use the reference to the new data returned by the Push Child method to get the value of the child’s auto-generated key or set data for the child. Calling Get Key on a Push Child reference returns the value of the auto-generated key.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki27.png

Update specific fields

To simultaneously write to specific children of a node without overwriting other child nodes, use the Update Children method.

When calling Update Children, you can update lower-level child values by specifying a path for the key. If data is stored in multiple locations to scale better, you can update all instances of that data using data fan-out. Simultaneous updates made this way are atomic: either all updates succeed or all updates fail.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki28.png

Delete data

The simplest way to delete data is to call Remove Value on a reference to the location of that data.

You can also delete by specifying a null Variant as the value for another write operation such as Set Value or Update Children. You can use this technique with Update Children to delete multiple children in a single API call.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki29.png

Transactions

When working with data that could be corrupted by concurrent modifications, such as incremental counters, you can use a transaction operation. You give this operation the Do Transaction function. This update function takes the current state of the data as an argument and returns the new desired state you would like to write. If another client writes to the location before your new value is successfully written, your update function is called again with the new current value, and the write is retried. If the transaction is rejected, the server returns the current value to the client, which runs the transaction again with the updated value. This repeats until the transaction is accepted or too many attempts have been made.

Note 1: Because Run Transaction is called multiple times, it must be able to handle null data. Even if there is existing data in your remote database, it may not be locally cached when the transaction function is run, resulting in null for the initial value.

Note 2: Only one transaction can be executed at the same time.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki30.png

How to make the Do Transaction function?

  1. Create a new Blueprint Class inherited from Firebase Database Reference Do Transaction Proxy.
  2. Override the Do Transaction function and make your own logic.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki31.png

Do Transaction is your own transaction handler, which the Firebase Realtime Database library may call multiple times to apply changes to the data, and should return success or failure depending on whether it succeeds.

This function will be called, possibly multiple times, with the current data at this location. The function is responsible for inspecting that data and modifying it as desired, then returning a Transaction Result specifying either that the Mutable Data was modified to a desired new state, or that the transaction should be aborted. Whenever this function is called, the Mutable Data passed in must be modified from scratch.

Since this function may be called repeatedly for the same transaction, be extremely careful of any side effects that may be triggered by this function. In addition, this function is called from within the Firebase Realtime Database library’s run loop, so care is also required when accessing data that may be in use by other threads in your application.

Realtime Features

You can add listeners to subscribe on changes in realtime to data in specified location at the database.

Value Listener

You can use the On Value Changed callbacks to subscribe to changes to the contents at a given path. This callback is triggered once when the listener is attached and again every time the data, including children, changes. The callback is passed a snapshot containing all data at that location, including child data. If there is no data, the snapshot returned is null. A read can be canceled (On Cancelled) if the client doesn’t have permission to read from a Firebase database location.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki33.png

Important: The On Value Changed event is called every time data is changed at the specified database reference, including changes to children. To limit the size of your snapshots, attach only at the highest level needed for watching changes. For example, attaching a listener to the root of your database is not recommended.

Child Listener

Child events are triggered in response to specific operations that happen to the children of a node from an operation such as a new child added through the Push Child method or a child being updated through the Update Children method. Each of these together can be useful for listening to changes to a specific node in a database. For example, a game might use these methods together to monitor activity in the comments of a game session.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki34.png

  • On Child Added – the callback is typically used to retrieve a list of items in a Firebase database. The On Child Added callback is called once for each existing child and then again every time a new child is added to the specified path. The listener is passed a snapshot containing the new child’s data.
  • On Child Changed – the callback is called any time a child node is modified. This includes any modifications to descendants of the child node. It is typically used in conjunction with the On Child Added and On Child Removed calls to respond to changes to a list of items. The snapshot passed to the listener contains the updated data for the child.
  • On Child Removed – the callback is triggered when an immediate child is removed. It is typically used in conjunction with the On Child Added and On Child Changed callbacks. The snapshot passed to the callback contains the data for the removed child.
  • On Child Moved – the callback is triggered whenever the On Child Changed call is raised by an update that causes reordering of the child. It is used with data that is ordered with Order By Child or Order By Value.

Remove Listeners

You can remove attached listeners simply calling Remove Child Listener or Remove Value Listener.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki35.png

Offline Features

Firebase applications work even if your game temporarily loses its network connection. In addition, Firebase provides tools for persisting data locally, managing presence, and handling latency.

Persistence Behavior

Firebase apps automatically handle temporary network interruptions. Cached data is available while offline and Firebase resends any writes when network connectivity is restored.

When you enable disk persistence, your app writes the data locally to the device so your app can maintain state while offline, even if the user or operating system restarts the app.

You can enable disk persistence by ticking Enable Disk Persistence option in Plugin Settings:

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki36.png

By enabling persistence, any data that the Firebase Realtime Database client would sync while online persists to disk and is available offline, even when the user or operating system restarts the game. This means your game works as it would online by using the local data stored in the cache. Listener callbacks will continue to fire for local updates.

The Firebase Realtime Database client automatically keeps a queue of all write operations that are performed while your game is offline. When persistence is enabled, this queue is also persisted to disk so all your writes are available when the user or operating system restarts the game. When the game regains connectivity, all the operations are sent to the Firebase Realtime Database server.

If your game uses Firebase Authentication, the Firebase Realtime Database client persists the user’s authentication token across game restarts. If the auth token expires while your game is offline, the client pauses write operations until your game re-authenticates the user, otherwise the write operations might fail due to security rules.

Keeping Data Fresh

The Firebase Realtime Database synchronizes and stores a local copy of the data for active listeners. In addition, you can keep specific locations in sync.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki37.png

The Firebase Realtime Database client automatically downloads the data at these locations and keeps it in sync even if the reference has no active listeners. You can turn synchronization back off with the following function.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki38.png

By default, 10MB of previously synced data is cached. This should be enough for most applications. If the cache outgrows its configured size, the Firebase Realtime Database purges data that has been used least recently. The data that is kept in sync is not purged from the cache.

Querying Data Offline

The Firebase Realtime Database stores data returned from a query for use when offline. For queries constructed while offline, the Firebase Realtime Database continues to work for previously loaded data. If the requested data hasn’t loaded, the Firebase Realtime Database loads data from the local cache. When network connectivity is available again, the data loads and will reflect the query.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki39.png

Save Data Offline

If a client loses its network connection, your game will continue functioning correctly.
Every client connected to a Firebase database maintains its own internal version of any active data. When data is written, it’s written to this local version first. The Firebase client then synchronizes that data with the remote database servers and with other clients on a “best-effort” basis.

As a result, all writes to the database trigger local events immediately, before any data is written to the server. This means your app remains responsive regardless of network latency or connectivity.

Once connectivity is reestablished, your game receives the appropriate set of events so that the client syncs with the current server state, without having to write any custom code.

Handling Transactions Offline

Any transactions that are performed while the game is offline, are queued. Once the game regains network connectivity, the transactions are sent to the Realtime Database server.

Even with persistence enabled, transactions are not persisted across game restarts. So, you cannot rely on transactions done offline being committed to your Firebase Realtime Database. To provide the best user experience, your game should show that a transaction has not been saved into your Firebase Realtime Database yet, or make sure your game remembers them manually and executes them again after a game restart.

Managing Presence

In realtime games it is often useful to detect when clients connect and disconnect. For example, you may want to mark a user as ‘offline’ when their client disconnects.

Firebase Database clients provide simple primitives that you can use to write to the database when a client disconnects from the Firebase Database servers. These updates occur whether the client disconnects cleanly or not, so you can rely on them to clean up data even if a connection is dropped or a client crashes. All write operations, including setting, updating, and removing, can be performed upon a disconnection.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki40.png

When you establish an On Disconnect operation, the operation lives on the Firebase Realtime Database server. The server checks security to make sure the user can perform the write event requested, and informs your game if it is invalid. The server then monitors the connection. If at any point the connection times out, or is actively closed by the Realtime Database client, the server checks security a second time (to make sure the operation is still valid) and then invokes the event.

An On Disconnect event can also be canceled by Cancel:

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki41.png

You can bind the following functions to On Disconnect:

  • Set Value – set the value of the data at the current location when the client disconnects.
  • Set Value And Priority – set the value and priority of the data at the current location when the client disconnects.
  • Remove Value – remove the value at the current location when the client disconnects.
  • Update Children – updates the specified child keys to the given values when the client disconnects.

Detecting Connection State

For many presence-related features, it is useful for your game to know when it is online or offline. Firebase Realtime Database provides a special location at /.info/connected which is updated every time the Firebase Realtime Database client’s connection state changes. Here is an example:

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki42.png

/.info/connected is a boolean value which is not synchronized between Realtime Database clients because the value is dependent on the state of the client. In other words, if one client reads /.info/connected as false, this is no guarantee that a separate client will also read false.

On Android, Firebase automatically manages connection state to reduce bandwidth and battery usage. When a client has no active listeners, no pending write or On Disconnect operations, and is not explicitly disconnected by the Go Offline method, Firebase closes the connection after 60 seconds of inactivity.

Is the early access version compatible with desktop game projects or is it mobile games only?

Hi looter,

Early Access includes complete and tested implementation for iOS & Android. Desktop version is still under development. Initial commit with desktop version will be available later this week (not production ready yet but good for testing). If you want to use this plugin in production, I’d recommend you to wait for final release. We are honest with our fans and customers. We know that developing process is too long but Realtime Database is not trivial thing and we don’t want to release unstable software. Mobile version is production-ready so we decided to release it for people who needs it only for mobile. But desktop version needs a bit more tests and polishing. Thank you for your patience! :slight_smile:

Authentication

Realtime Database plugin is compatible with Ultimate Mobile Kit plugin. If you use the latter, you should use its Authentication module as it is more powerful and advanced than in the Realtime Database plugin. If you haven’t purchased the Ultimate Mobile Kit or your game is designed for platforms other than mobile, you can use simple Firebase Database Authentication module described in this section.

Initialization

Before making any call to Authentication, you should first execute Firebase Database Authentication Init function. If the result is a fail, study logs to find out what causes an issue.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki43.png

Create User With Email And Password

Create a form that allows new users to register with your app using their email address and a password. When a user completes the form, validate the email address and password provided by the user, then pass them to the Firebase Database Create User With Email And Password function.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki44.png

Send Email Verification

You can send an address verification email to a user with the Firebase Database Send Email Verification function. You can customize the email template that is used in the Authentication section of the Firebase console.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki45.png

Send Password Reset Email

You can send a password reset email to a user with the Firebase Database Send Password Reset Email method. You can customize the email template that is used in the Authentication section of the Firebase console. You can also send password reset emails from the Firebase console.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki46.png

Sign In With Email And Password

The steps for signing in a user with a password are similar to the steps for creating a new account. When a user signs in to your game, pass the user’s email address and password to Firebase Database Sign In With Email And Password.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki47.png

Update Email

You can set a user’s email address with the Firebase Database Update Email function.

Important: To delete a user, the user must have signed in recently.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki48.png

Update Password

You can set a user’s password with the Firebase Database Update Password function.

Important: To delete a user, the user must have signed in recently.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki49.png

Sign Out

To sign out a user from the game, call the Firebase Database Sign Out function.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki50.png

Is User Logged In

You can check whether a user is logged in to your game calling Firebase Database Is User Logged In.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki51.png

Reauthenticate User

Some security-sensitive actions—such as deleting an account, setting a primary email address, and changing a password—require that the user has recently signed in. If you perform one of these actions, and the user signed in too long ago, the action fails.

When this happens, re-authenticate the user by getting new sign-in credentials from the user and passing the credentials to Firebase Database Reauthenticate User.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki52.png

Authentication Listener

To respond to sign-in and sign-out events, attach the RealtimeDatabase component to the global actor (for example Game Mode). This listener gets called whenever the user’s sign-in state changes. Because the listener runs only after the authentication object is fully initialized and after any network calls have completed, it is the best place to get information about the signed-in user. By using a listener, you ensure that the Auth object isn’t in an intermediate state — such as initialization — when you get the current user.

Sometimes user’s ID token might be changed. Event User Id Token Changed is called when there is a change in the current user’s ID token.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Wiki53.png

http://gamednastudio.com/plugins/images/RealtimeDatabase/Update1.png

Realtime Database Early Access

We’ve just launched Early Access for Realtime Database. Early Access includes completed and tested implementation for iOS & Android. Version for other platforms is still under development and you have access to work-in-progress source code on the GitHub repository.

It includes full documentation, big example project, and is fully supported by us:

During Early Access period you have big impact how final plugin will looks like! If you have any suggestions or feature requests, feel free to send them to us: support [at] gamednastudio.com

Buy now on Sellfy (Early Access): https://sellfy.com/p/e9ru/

Thanks for understanding.

I stand corrected. Thanks for taking the time to explain and taking the time to respond trough PM.

Again thanks for everything you have done up till now and keep up the great work. I for one am happy with your products and support, keep up the great work.

Thank you!

Realtime Database 0.9.2 released!

We’ve just released update for plugin. You can download it from GitHub repository on releases tab or your Sellfy dashboard.

CHANGELOG:

  • Added ability to set placeholder timestamp value you may write into Firebase Database as a value that will automatically be populated by the Firebase Database server.

https://gamednastudio.com/plugins/images/RealtimeDatabase/Update2.png

If you haven’t owned it yet, you can buy now on Sellfy.

Realtime Database 0.9.3 released!

We’ve just released update for plugin. You can download it from GitHub repository on releases tab or your Sellfy dashboard.

CHANGELOG:

  • Fixed a problem with detecting Firebase Realtime Database libraries in Shipping build.
  • Fixed a problem with latin characters in String Variant.

If you haven’t owned it yet, you can buy now on Sellfy.

Oh my, I am so hyped for this! Thank you for working on this, I can’t wait for the release so I can test it out. :slight_smile:

Realtime Database 0.9.4 Preview for UE 4.18 Preview 3!

We’ve just released plugin binaries for Unreal Engine 4.18 Preview 3.
You can download it from GitHub repository on releases tab.

If you find any bug, feel free to report it :slight_smile:

If you haven’t owned it yet, you can buy now on Sellfy.

http://gamednastudio.com/plugins/images/RealtimeDatabase/Update3.png

Realtime Database Plugin 0.9.4 (Early Access) for UE 4.18 final release!

We’ve just released plugin binaries for Unreal Engine 4.18
You can download it from GitHub repository on releases tab or your Sellfy dashboard.

CHANGELOG:

  • Tweaks for UE 4.18 compatibility

If you haven’t owned it yet, you can buy now on Sellfy.

http://gamednastudio.com/plugins/images/RealtimeDatabase/Update6.png

Realtime Database Plugin 0.9.5 (Early Access) released!

We’ve just released update for Realtime Database Plugin.
You can download it from GitHub repository on releases tab or your Sellfy dashboard.

Please note that ANT is now deprecated and will be removed completely in the next plugins release. You should switch to Gradle.

CHANGELOG:

  • Tweaks for UE 4.18 compatibility
  • Added Android Oreo compatibility
  • Added iPhone X compatibility
  • Firebase C++ SDK updated to 4.3.0
  • Google Play Services updated to 11.6.2 (Gradle only)
  • Firebase SDK for Android updated to 11.6.2 (Gradle only)
  • Google Services Plugin for Android updated to 3.1.2
  • Firebase SDK for iOS updated to 4.7.0

If you haven’t owned it yet, you can buy now on Sellfy.