Firebase Realtime Database¶
Non-Visible component| Category | Requires | Version |
|---|---|---|
| API 21, Android 5.0 Lollipop | 1 |
Overview¶
Non-visible component that communicates with Firebase Realtime Database to store and retrieve data in real-time. Requires google-services.json. Authenticate users via the KodularFirebaseAuthentication component.
Events¶
Data Changed¶
Indicates that the data in the Firebase has changed.
| Params | |
|---|---|
| tag | Text |
| value | Any |
Firebase Error¶
Indicates that the communication with the Firebase signaled an error.
| Params | |
|---|---|
| message | Text |
First Removed¶
Event triggered by the "RemoveFirst" function. The argument "value" is the object that was the first in the list, and which is now removed.
| Params | |
|---|---|
| value | Any |
Got Value¶
Indicates that a GetValue request has succeeded.
| Params | |
|---|---|
| tag | Text |
| value | Any |
Initialize¶
Fired when the component finishes initialization. Mirrors legacyFirebaseDB.Initialize.
Tag List¶
Event triggered when we have received the list of known tags. Used with the "GetTagList" Function.
| Params | |
|---|---|
| value | List |
Methods¶
Append Value¶
Append a value to the end of a list atomically. If two devices use this function simultaneously, both will be appended and no data lost.
| Params | |
|---|---|
| tag | Text |
| value To Add | Any |
Clear Tag¶
Remove the tag from Firebase
| Params | |
|---|---|
| tag | Text |
Get Tag List¶
Get the list of tags for this application. When complete a "TagList" event will be triggered with the list of known tags.
Get Value¶
Method for GetValue
| Params | |
|---|---|
| tag | Text |
| value If Tag Not There | Any |
Go Offline¶
Take the database offline
Go Online¶
Take the database online
Remove First¶
Return the first element of a list and atomically remove it. If two devices use this function simultaneously, one will get the first element and the other will get the second element, or an error if there is no available element. When the element is available, the "FirstRemoved" event will be triggered.
| Params | |
|---|---|
| tag | Text |
Store Value¶
Method for StoreValue
| Params | |
|---|---|
| tag | Text |
| value To Store | Any |
Properties¶
Persist¶
Boolean Default: False Write - Designer
If true, data will be cached locally and survive app restarts. Must be set in the designer before any FirebaseDatabase operation; changing this at runtime via blocks is not supported.
Project Path¶
Text Read Write - Designer Blocks
Optional root path prefix for all operations. Empty means operate at the database root.