Other B4X Push Server

Shay

Well-Known Member
Licensed User
Longtime User
Here is the full log that I get (while it fails to retry)
 

Shay

Well-Known Member
Licensed User
Longtime User
This happens while I start the server, at this point nothing should go from the server
meaning I will send notification only when I get request from someone, and I will send it to specific phones (by type - android or IOS)
(I have query in DB that check if phone is android / ios - db contains both users)
so this part should not be trigger and this point

I can run more debugs, just let me know what to do
 

Shay

Well-Known Member
Licensed User
Longtime User
I don't have network problems
Can you issue some debug version
 

Shay

Well-Known Member
Licensed User
Longtime User
Did not help
 

walterf25

Expert
Licensed User
Longtime User
Hi All, I was wondering if i could get some help from the experts, i'm trying to get this to work, i've added my senderID to the B4A Push Example app, as well as the my laptop's ip address and the listening port.

The push example app seems to work fine but it doesn't seem to register i get this error


Any Ideas why I get this, I also placed the api key in the config text file in the B4J project, any suggestions or comments will be helpful.

Thanks all
Walter
 

walterf25

Expert
Licensed User
Longtime User
Never mind all i've figured it out, it turns out that there was an extra forward slash in the poststring here

B4X:
Sub HandleRegistrationResult(Intent As Intent)
    If Intent.HasExtra("error") Then
        Log("Error: " & Intent.GetExtra("error"))
        ToastMessageShow("Error: " & Intent.GetExtra("error"), True)
    Else If Intent.HasExtra("registration_id") Then
        Dim token As String = Intent.GetExtra("registration_id")
        Log("token: " & token)
        Dim j As HttpJob
        j.Initialize("j", Me)
        Log("url: " & Main.ServerUrl & "deviceToken")
        Log("token: " & token)
        j.PostString(Main.ServerUrl & "devicetoken", "token=" & token & "&type=2")    
    End If 
End Sub

the variable main.ServerUrl already has a forward slash at the end of it and there was another one added right at "/devicetoken"
so the url was looking like this "url: http://192.xxx.xx.xx:51044//deviceToken" with two forward slashes right after the listening port.

Thanks all
Walter
 

Shay

Well-Known Member
Licensed User
Longtime User
keep testing it, since sometimes it will connect at first try and sometimes after many retry
 

walterf25

Expert
Licensed User
Longtime User
Can the B4J Push Server be run on a host? i would like to move the program from my pc to another place where i can access it from anywhere?

Thanks,
Walter
 

fishwolf

Well-Known Member
Licensed User
Longtime User
I have configure the server for Android and work fine.

Now for Ios, i have create the certificate, copy in Key Folder and run the "Create push keystore", but i have a Error Connection after 10-15 seconds.

What is the problem?



 
Last edited:

Shay

Well-Known Member
Licensed User
Longtime User
Erel, can you check if you stop the server and start it again (please try this few times)
if you get my errors or not?
also what is java openjdk version that you are using?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…