Android Question Firebase RealtimeDatabase the event onDatachange will not be raised

musaso

Active Member
Licensed User
Longtime User
(sorry for poor english)

B4X:
    Dim Firebase As FirebaseDatabase
    Dim DatosFirebase As DatabaseReference

    Firebase.Initialize("Realtime")
    Firebase.PersistenceEnabled = True
    Firebase.goOnline
    
    DatosFirebase.Initialize("Reference",Firebase.getReference2("/"),"root")
    DatosFirebase.addListenerForSingleValueEvent
    DatosFirebase.keepSynced(True)

Sub Reference_onDataChange(snapshot As Object, tag As Object)
   If snapshot <> Null Then 'Hay datos
       Dim snap As DataSnapshot' = snapshot
       snap.Initialize(snapshot)
       'Log(snapshot)
       Dim m As Map = snap.Value
         ................. etc
    End If 'Hay datos
   
End Sub

onDatachange only be raised on app start, not when the data changes in Firebase.
since the change of version to 9.30.
APP running for more than a year without problems.
Thanks for the help
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…