Hi,
I created a module that makes it easy to communicate with a Firebase RealtimeDatabase using their REST API.
The Module is attached to this post and only needs HTTPUtils2(iOS) to work, it should also work in B4A and B4J without a problem.
Example Code:
Please Note: This is, by far, not best practice because it ignores a lot of features and advantages of the realtime database but for simple and small projects that just need a basic back-end it is usable and it works.
I created a module that makes it easy to communicate with a Firebase RealtimeDatabase using their REST API.
The Module is attached to this post and only needs HTTPUtils2(iOS) to work, it should also work in B4A and B4J without a problem.
Example Code:
B4X:
Dim DB As FirebaseRealtimeDatabase
DB.Initialize("DB",Me,"https://[YOUR_PROJECT_ID].firebaseio.com/")
DB.ReadData("news/today","","news")
Wait For DB_DataBaseCommunicationComplete(ResponseData As Map, RequestTag As String)
If ResponseData.IsInitialized Then
'Do your stuff
Else
Msgbox("Something went wrong!","Oops...")
End If
Please Note: This is, by far, not best practice because it ignores a lot of features and advantages of the realtime database but for simple and small projects that just need a basic back-end it is usable and it works.