B4R Question No results reading 7 bytes from a field of firebase database with esp-12. Some help?

Erel

B4X founder
Staff member
Licensed User
Longtime User
Works fine here. Tested with this code:
B4X:
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

Tested on ESP8266 with B4R v2.00.
 
Upvote 0

XorAndOr

Active Member
Licensed User
Longtime User
Works fine here. Tested with this code:

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")

Thanks anyway for the support ;)
 
Upvote 0

XorAndOr

Active Member
Licensed User
Longtime User
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
 
Upvote 0
Top