ref.Initialize("Reference", Starter.realtime.getReferencefromUrl($"https://${Starter.strFirebaseProjectId}.firebaseio.com/"$) )
java.lang.NullPointerException
at de.donmanfred.DatabaseReferenceWrapper$5.onComplete(DatabaseReferenceWrapper.java:236)
at com.google.android.gms.internal.zzbpj$20.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5319)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Sub Class_Globals
Dim reference As String
Dim disc As Boolean
Dim realtime As FirebaseDatabase
Dim ref As DatabaseReference
Dim father As Object
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize(refname As String, disconnecteverytimetime As Boolean, activityname As Object)
reference=refname
disc=disconnecteverytimetime
father=activityname
End Sub
Sub connectDB
If realtime.IsInitialized= False Then
realtime.Initialize("Realtime")
realtime.PersistenceEnabled = True
End If
realtime.goOnline
End Sub
Sub writeDB(telefono As String, valore As String)
connectDB
ref.Initialize("Reference",realtime.getReferencefromUrl("https://<my-app>/users" ))
Dim mp As Map
mp.Initialize
Dim mp1 As Map
mp1.Initialize
mp1.Put("IID",valore)
mp.Put(telefono,mp1)
ref.push
ref.updateChildren(mp)
End Sub
Sub readDB(telefono As String)
connectDB
ref.Initialize("Reference",realtime.getReferencefromUrl("https://<my-app>/users/" & telefono))
ref.addListenerForSingleValueEvent
End Sub
Sub Reference_oncomplete(errorCode As Int, errorMessage As String, errObj As Object)
Log(errorMessage)
CallSub3(father,reference & "_onComplete",errorCode,errorMessage)
'If disc Then realtime.goOffline
End Sub
Sub Reference_onCancelled(errnum As Int,error As String)
Log($"ref_onCancelled(${errnum},${error})"$)
End Sub
Sub Reference_onChildAdded(snapshot As Object, child As String)
Log($"ref_onChildAdded(${child})"$)
End Sub
Sub Reference_onChildChanged(snapshot As Object, child As String)
Log($"ref_onChildchanged(${child})"$)
End Sub
Sub Reference_onChildMoved(snapshot As Object, child As String)
Log($"ref_onChildMoved(${child})"$)
End Sub
Sub Reference_onChildRemoved(snapshot As Object)
Log($"ref_onChildRemoved()"$)
End Sub
Sub Reference_onDataChange(snapshot As Object)
Log($"ref_onDatachange()"$)
Dim snap As DataSnapshot = snapshot
If snap.exists = False Then
Dim mapnul As Map
mapnul.initialize
If disc Then realtime.goOffline
CallSub2(father,reference & "_onDataChange", mapnul)
Return
End If
Dim json As JSONParser
json.Initialize(snap.Value)
Dim root As Map = json.NextObject
If disc Then realtime.goOffline
CallSub2(father,reference & "_onDataChange", root)
End Sub
The library is not maintained anymore as it was a total fail, does not work as expected (that´s the reason why the lib is listed in the "old library archive")
I suggest not to use it anymore.
Feel free to do this on all libraries you wrote.Don, maybe when a library is not "production quality", the first line of the first post should say something like (on bold red text)
The library is not search-able as it is placed in this sub-forum.
I now removed the link in my Libraryoverview too.
Feel free to do this on all libraries you wrote.
Logger connected to: motorola XT890
--------- beginning of /dev/log/main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
lib:Raising.. reference_oncancelled()
lib:Raising.. reference_oncancelled()
lib:Raising.. reference_oncancelled()
ref imagesizes = https://esquefengineapp.firebaseio.com/imagesizes
** Activity (main) Resume **
An error occurred:
(Line: 47) End Sub
java.lang.Exception: Sub reference_oncancelled signature does not match expected signature.
public static anywheresoftware.b4a.pc.RemoteObject sancrisapp.dos.cero.main_subs_0._reference_oncancelled(anywheresoftware.b4a.pc.RemoteObject,anywheresoftware.b4a.pc.RemoteObject) throws java.lang.Exception
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
lib:Raising.. reference_oncancelled()
lib:Raising.. reference_oncancelled()
lib:Raising.. reference_oncancelled()
ref imagesizes = https://esquefengineapp.firebaseio.com/imagesizes
** Activity (main) Resume **
An error occurred:
(Line: 47) End Sub
java.lang.Exception: Sub reference_oncancelled signature does not match expected signature.
public static anywheresoftware.b4a.pc.RemoteObject sancrisapp.dos.cero.main_subs_0._reference_oncancelled(anywheresoftware.b4a.pc.RemoteObject,anywheresoftware.b4a.pc.RemoteObject) throws java.lang.Exception
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
lib:Raising.. reference_oncancelled()
lib:Raising.. reference_oncancelled()
lib:Raising.. reference_oncancelled()
ref imagesizes = https://esquefengineapp.firebaseio.com/imagesizes
** Activity (main) Resume **
An error occurred:
(Line: 47) End Sub
java.lang.Exception: Sub reference_oncancelled signature does not match expected signature.
public static anywheresoftware.b4a.pc.RemoteObject sancrisapp.dos.cero.main_subs_0._reference_oncancelled(anywheresoftware.b4a.pc.RemoteObject,anywheresoftware.b4a.pc.RemoteObject) throws java.lang.Exception
' Get a reference to the customers folder of the DB. Do not set any Listeners here....
cust.Initialize("Customers",realtime.getReference2("customers/"),"customers/")
' Now we create a query from the cust-reference and get the first 5 Items (including all subtree-data from them)
' The last we add is the Listener
Dim qry As Query = cust.LimitToFirst(5).orderByChild("id").setEventname("Customers","customers").addChildEventListener.addValueEventListener
Logger verbunden mit: 9885e6514556383552
--------- beginning of crash
--------- beginning of main
--------- beginning of system
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (firebasemessaging) Create ***
** Service (firebasemessaging) Start **
lib:Raising.. customers_onchildadded()
lib:Raising.. customers_onchildadded()
lib:Raising.. customers_onchildadded()
lib:Raising.. customers_onchildadded()
lib:Raising.. customers_onchildadded()
ref_onChildAdded(customers,root)
libquery:Raising.. customers_ondatachange()
NOTE: The addChildEventListener is responsible for these Events....
customers_onChildAdded(8,customers, SizeofCustomers: 1)
customers_onChildAdded(9,customers, SizeofCustomers: 2)
customers_onChildAdded(10,customers, SizeofCustomers: 3)
customers_onChildAdded(11,customers, SizeofCustomers: 4)
customers_onChildAdded(12,customers, SizeofCustomers: 5)
NOTE: The addValueEventListener is resposible for this Event.
customers_onDatachange(customers)
Note: you´ll get a list of Maps with the 5 results (in this case)
So, basically you only need either the addValueEvenentListener OR the addChildEventListener
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
"users/"&Starter.phone.GetSettings("android_id")&"/Messages"
mymessages.Initialize("Chat",realtime.getReference2("users/"&Starter.phone.GetSettings("android_id")&"/Messages"),"users/"&Starter.phone.GetSettings("android_id")&"/Messages")
mymessages.LimitToFirst(5).addChildEventListener
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (firebasemessaging) Create ***
** Service (firebasemessaging) Start **
lib:Raising.. chat_onchildadded()
lib:Raising.. chat_onchildadded()
lib:Raising.. chat_onchildadded()
lib:Raising.. chat_onchildadded()
lib:Raising.. chat_onchildadded()
ref_onChildAdded(customers,root)
chat_onChildAdded(-Kxr8Itwnotrgdcj1hux,users/b0d0d7f9b81140c3/Messages)
(MyMap) {time=1509532450428, From=ErelClone, Message=Hiiii Master, Title=MyGreatSubject}
chat_onChildAdded(-Kxr8n0dyaX-xhBZ465A,users/b0d0d7f9b81140c3/Messages)
(MyMap) {time=1509532577897, From=ErelClone, Message=Hello there, Title=this is the subject}
chat_onChildAdded(-Kxr9xkvk_gLGDDMgvGQ,users/b0d0d7f9b81140c3/Messages)
(MyMap) {time=1509532884028, From=AnotherUser, Message=You are great, Title=My subject}
chat_onChildAdded(-KxrC8Pg8bvQLwtRwEyW,users/b0d0d7f9b81140c3/Messages)
(MyMap) {time=1509533456045, From=AnotherUser, Message=Hello there, Title=My subject}
chat_onChildAdded(-KxrIdKfXuD9SmxrRPAQ,users/b0d0d7f9b81140c3/Messages)
(MyMap) {time=1509535159660, From=Someone, Message=Hi Master, Title=this is the subject}
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
Objects\bin\extra\res7\res\values-v26\values-v26.xml:16: error: Error: No resource found that matches the given name: attr 'android:autofillHints'.
platformversion
#AdditionalJar: constraint-layout.aar
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?