[Free] Firebase Realtime Database Extension

:blue_book: FBRealtimeDatabase – Extension

Package: com.fbrealtimedatabase

Version: 1

Description: Firebase Realtime Database extension which simplifies REST API calls

1. Overview

This extension allows you to store, read, delete and list data from Firebase Realtime Database using REST API.

Supports auth token and dynamic Firebase paths.

2. Properties

-–

:pushpin: DatabaseUrl (String)

component_set_get (1)

Firebase database URL.

Example:

https://your-app-default-rtdb.firebaseio.com

-–

:pushpin: ProjectBucket (String)

component_set_get (2)

Top-level folder where all data is stored.

Examples:

Users

Users/India

DeviceData

-–

:pushpin: AuthToken (String)

component_set_get

Authentication token appended as ?auth=TOKEN.

If Firebase rules are "admin write

only," this token is required.

3. Functions

-–

:right_arrow: AddChild(tag, key, value)

Stores a value at ProjectBucket/tag/key

Example:

AddChild(“DEVICE1234”, “Username”, “XYZ”)

Fires Event:

StoreKeyValueDone(success, response)

-–

:right_arrow: GetTagList()

component_method (1)

Returns all child keys inside ProjectBucket.

Fires Event

TagListReceived(list)

-–

:right_arrow: GetValue(path)

Reads content from the given path inside project bucket.

_Example input:_

DEVICE1234/userName

Fires Event

ValueReceived(path, rawValue)

-–

:right_arrow: RemoveValue(path)

Deletes the value at:

ProjectBucket/path

Fires Event

RemoveValueDone(path, success, response)

-–

4.Events

-–

:loudspeaker: StoreKeyValueDone(success, response)

Called after AddChild completes.

-–

:loudspeaker: TagListReceived(tagList)

Returns all child keys of ProjectBucket.

-–

:loudspeaker: ValueReceived(path, rawValue)

Returns value received from GetValue. tag value or key value.

-–

:loudspeaker: RemoveValueDone(path, success, response)

Called after Delete operation is completed.

-–

:loudspeaker: FirebaseError(functionName, errorMessage)

Fired when any Firebase request fails.

-–

5. Usage Examples

-–

*:check_mark: Initialize Extension*

FB.DatabaseUrl(“https://your-app.firebaseio.com”)

FB.ProjectBucket(“Users”)

FB.AuthToken(“YOUR_SECRET_TOKEN”) // optional

-–

:check_mark: Store Data

FB.AddChild(“DEVICE1234”, “userName”, “XYZ”)
tag:DEVICE1234, key: userName, value:XYZ

Event:

StoreKeyValueDone(success, response)

-–

:check_mark: Read Data

FB.GetValue (“tag/key”) or (“tag”)

Event:

ValueReceived(path, rawValue)

-–

:check_mark: Delete Data

FB.RemoveValue(“tag/key”) or (tag)

Event:

RemoveValueDone(path, success, response)

-–

:check_mark: Get All Nodes

FB.GetTagList()

Event:

TagListReceived(tagList)

AIX Download :-

FBRealtimeDatabase.aix (17.4 KB)

:heart: If you love it, buy me a coffee :hot_beverage:

why u make bucket is compulsory ? when i doing empty bucket then not fetching data

please guide me

@Re-vision_point Can you please explain what you want to fetch ?

Your Firebase setup is working perfectly, but it’s missing the “add item to Firebase list” feature found in the native component; everything else is great. I’m willing to pay if you can fix this. I want an extension that behaves as close as possible to the App Inventor one, but without relying on the platform’s built-in version, as that causes a lot of bugs when I transfer the project to another platform.