Android Question Firebase Realtime DB - How to?

rogersantosferreira

Member
Licensed User
Hi! As oriented by DonManfred in thread: https://www.b4x.com/android/forum/threads/firebase-realtimedatabase.69773/, I decided to ask here for help. Sorry DonManfred, I will not post in ancient threads anymore. Just learning.

I'm here to ask if anyone can help me work with Firebase Realtime DB in B4A. I really don't understand very well the details of programming in B4A, but I'm trying. The last time I used it was almost 3 years ago.

Thanks in advance and sorry about my english. It is not my first language.
Here follows my example exported in zip and using the example code offered from DonManfred.
 

Attachments

rogersantosferreira

Member
Licensed User
Oh! Sorry, DonManfred!
As the other examples I tested from libs in forum, I expected it to store or retrieve something from realtime db.

I just downloaded the example at your lib thread (https://www.b4x.com/android/forum/attachments/firebaserealtimedatabaseex-zip.75957/), and run it placing the extras and dependencies. I'm just trying to make it work. Only this.

As a beginner in B4A, I expected the code in Starter Service to do something. I'm from Xamarin universe and trying new tools.
Sorry again, and thanks for your work.
 

DonManfred

Expert
Licensed User
I expected the code in Starter Service to do something
it does. Accesing a specific path in your db and fetch all infos in there.
B4X:
msgref.Initialize("Reference",realtime.Reference.Child("users/"&phone.GetSettings("android_id")&"/Messages"),"users/"&phone.GetSettings("android_id")&"/Messages")
I expect you do not have this path and also no data in there

Start with
B4X:
msgref.Initialize("Reference",realtime.Reference.Child("users/"),"users/") ' Fetch all from users  <- adapt to a path available
 
Top