B4A Class [B4X] FirebaseRealtimeDatabase

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:

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.
 

Attachments

  • FirebaseRealtimeDatabase.bas
    5.2 KB · Views: 821

DonManfred

Expert
Licensed User
Longtime User
Parece que no usaste la búsqueda en el foro...
Ver aquí: https://www.b4x.com/android/forum/threads/firebase-realtimedatabase.69773/page-3#post-456861 (Publicar si es de 2016)
Discúlpame no se si esta bien escribir aquí, pero no logro encontrar solución en ningún lugar. esto aun funciona el día de hoy?
tengo un proyecto con base de datos en tiempo real que hasta el año pasado funcionó perfectamente, pero al día de hoy ya no funciona, muestra errores en la compilación, ya no sirven las librerías? por favor alguien que me oriente si hay otra forma de hacerlo. de antemano disculpas y muchas gracias.
 

asales

Expert
Licensed User
Longtime User
This is the English forum, you can write in english here or use the Spanish forum.
Este es el foro en inglés, puedes escribir en inglés aquí o usar el foro en español.

I think the other only option in the forum is this (paid) lib:
 
Top