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
-β
DatabaseUrl (String)

Firebase database URL.
Example:
https://your-app-default-rtdb.firebaseio.com
-β
ProjectBucket (String)

Top-level folder where all data is stored.
Examples:
Users
Users/India
DeviceData
-β
AuthToken (String)

Authentication token appended as ?auth=TOKEN.
If Firebase rules are "admin write
only," this token is required.
3. Functions
-β
AddChild(tag, key, value)

Stores a value at ProjectBucket/tag/key
Example:
AddChild(βDEVICE1234β, βUsernameβ, βXYZβ)
Fires Event:
StoreKeyValueDone(success, response)
-β
GetTagList()

Returns all child keys inside ProjectBucket.
Fires Event
TagListReceived(list)
-β
GetValue(path)

Reads content from the given path inside project bucket.
_Example input:_
DEVICE1234/userName
Fires Event
ValueReceived(path, rawValue)
-β
RemoveValue(path)

Deletes the value at:
ProjectBucket/path
Fires Event
RemoveValueDone(path, success, response)
-β
4.Events
-β
StoreKeyValueDone(success, response)

Called after AddChild completes.
-β
TagListReceived(tagList)

Returns all child keys of ProjectBucket.
-β
ValueReceived(path, rawValue)

Returns value received from GetValue. tag value or key value.
-β
RemoveValueDone(path, success, response)

Called after Delete operation is completed.
-β
FirebaseError(functionName, errorMessage)

Fired when any Firebase request fails.
-β
5. Usage Examples
-β
*
Initialize Extension*
FB.DatabaseUrl(βhttps://your-app.firebaseio.comβ)
FB.ProjectBucket(βUsersβ)
FB.AuthToken(βYOUR_SECRET_TOKENβ) // optional
-β
Store Data
FB.AddChild(βDEVICE1234β, βuserNameβ, βXYZβ)
tag:DEVICE1234, key: userName, value:XYZEvent:
StoreKeyValueDone(success, response)
-β
Read Data
FB.GetValue (βtag/keyβ) or (βtagβ)
Event:
ValueReceived(path, rawValue)
-β
Delete Data
FB.RemoveValue(βtag/keyβ) or (tag)
Event:
RemoveValueDone(path, success, response)
-β
Get All Nodes
FB.GetTagList()
Event:
TagListReceived(tagList)
AIX Download :-
FBRealtimeDatabase.aix (17.4 KB)
If you love it, buy me a coffee ![]()
