Hi all,
The log indicates " Failed to connect " in JobDone
P.S. With B4A and B4J the same code works fine by reading the same firebase database field
The roules of firebase are True-True in write and read
Thank you
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
polling_Tick
End Sub
Sub polling_Tick
HttpJob.Initialize("HttpJob")
HttpJob.Download("https://xxxx.firebaseio.com/xxx.json")
End Sub
Sub JobDone (Job As JobResult)
If Job.Success Then
Log(Job.Response)
Else
Log("error")
End If
End Sub
Maybe i have a hardware problem with esp-12
With fcm notification works fine. Even with the php file on the private server. The idea was to use both the fcm and the google server database without using my private online server.
With this code works in php
B4X:
HttpJob.Initialize("HttpJob")
HttpJob.Post("http://myserveronline.xxx/file.php", "SELECT * FROM table")
Solved Replacing the timer as polling I used the CallSubPlus
and now works on the google firebase database server
With the timer in my project it does not work
B4X:
CallSubPlus("LinkFireBase",1000,0)' --->Sub
Private Sub LinkFireBase(unused As Byte)
HttpJob.Download("https://xxxxxxx.firebaseio.com/xxxxxx.json")
CallSubPlus("LinkFireBase",1000,0)' loop polling
End Sub
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.