Android Question Firebase Realtime DB - How to?

Discussion in 'Android Questions' started by rogersantosferreira, Apr 23, 2019.

  1. rogersantosferreira

    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.
     

    Attached Files:

  2. DonManfred

    DonManfred Expert Licensed User

    You code is DOING NOTHING. What do you expect to happen here?
    I can´t see any use of the library in your code additionally.
     
  3. rogersantosferreira

    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.
     
  4. DonManfred

    DonManfred Expert Licensed User

    it does. Accesing a specific path in your db and fetch all infos in there.
    Code:
    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
    Code:
    msgref.Initialize("Reference",realtime.Reference.Child("users/"),"users/"' Fetch all from users  <- adapt to a path available
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice