I am running out the example program contained here:
https://www.b4x.com/android/forum/threads/firebase-realtimedatabase.69773/
I replaced one of the lines with this:
Without making any other changes, I run the app and immediately get an error.
So this is how my database looks. I'm not sure if I'm doing it right.
https://www.b4x.com/android/forum/threads/firebase-realtimedatabase.69773/
I replaced one of the lines with this:
B4X:
msgref.Initialize("Reference",realtime.Reference.Child("users/"),"users/")
Without making any other changes, I run the app and immediately get an error.
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
lib1:Raising.. queryresult_ondatachange()
QueryResult_onDataChange()
Error occurred on line: 75 (Starter)
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
at anywheresoftware.b4a.keywords.Common.GetType(Common.java:743)
at db.test.starter._queryresult_ondatachange(starter.java:217)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:735)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:357)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA$2.run(BA.java:365)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
** Activity (main) Pause, UserClosed = true **
So this is how my database looks. I'm not sure if I'm doing it right.