Android Question Firesore Document Reference OnvalueSet onEvent

gregorio_adrian_gimenez

Active Member
Licensed User
Longtime User
HI,
Not raised onValueSet or Onevent, with document reference,

En release , generating this error:

java.lang.Exception: Sub actualizausuariosgps_onvalueset signature does not match expected signature.
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:198)
at anywheresoftware.b4a.BA$2.run(BA.java:370)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5593)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

code

B4X:
Sub    usuarioscambiogps_snapshot(success As Boolean, data As QuerySnapshot, info As String)
    
    If data.Size > 0 Then
        
    Log ("usuario cambio gps:" & success)
        
        
    Dim documento As List = data.Documents
        

    
    If documento.IsInitialized Then
        'If  documento > 0 Then
            For i = 0 To documento.Size-1
                Dim docsnap As DocumentSnapshot = documento.Get(i)
            
                Log("consulta Documento No: #"&i&": "&docsnap.Id)
        
                
                    
                Dim cambio_gps As DocumentReference =fs.document("usuarios/"& docsnap.Id)
        
                
                cambio_gps.setEventname("actualizausuariosgps","Update")
                
                
                Dim geo As Map
                geo.Initialize
                geo.Put("geo",loc)
                
                cambio_gps.merge(geo,"update")
            Next
        
    End If
    End If
End Sub

Sub actualizausuariosgps_onValueSet(value As Object)
End Sub
Sub actualizausuariosgps_onEvent(snap As Object, error As Object)
End Sub
 

DonManfred

Expert
Licensed User
Longtime User
Try it with v0.62 please.
 
Upvote 0
Top