B4J Question Send firebase notifications using b4j

Isac

Active Member
Licensed User
Longtime User
hi
I did an application with Cordova and would like to use b4j to send notifications.
I tried the FCMPush application but I can not send the message.

The application should send the message by topic.


changed only the server key

B4X:
'Non-UI application (console / server application)
#Region  Project Attributes
    #CommandLineArgs:
    #MergeLibraries: True
#End Region

Sub Process_Globals
Private const API_KEY As String = "   Server key  "
End Sub



the log indicates this:

Waiting for debugger to connect ...
Program started.
[jobname = fcm, success = true, username =
, password =, errormessage =, target = class b4j.example.main
, taskid = 1, req=anywheresoftware.b4h.okhttp.OkHttpClientWrapper$OkHttpRequest@1ddc4ec2, tag=java.lang.Object@133314b
, httputils2service = null]
{"Message_ID" 9111159960307....}
Program terminated (StartMessageLoop was not called).

thank you
 

Isac

Active Member
Licensed User
Longtime User
it works, I did not change the topic


B4X:
Sub AppStart (Args() As String)
    SendMessage("TOPIC", "This is the title", "Hello!!!!")
    StartMessageLoop
End Sub

is there a library for ajax?
 
Upvote 0
Top