B4J Question firebase bj4 + b4a

luisro

Member
Licensed User
Hello, I have this simple server example b4j, where it sends a message to the client application:

https://www.b4x.com/android/forum/t...s-firebase-cloud-messaging-fcm.67716/#content

-and create a project with firebase correctly
-and put the json tool in the folder of my project
- correctly create the service with the corresponding name (FirebaseMessaging)
- I get the notifications correctly from the firebase page.

Now in program b4j I enter the server key where it is indicated, when I run the program I get the following.

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@bc508c, tag=java.lang.Object@19866c
, httputils2service=null]
{"message_id":5747574234248541793}
Program terminated (StartMessageLoop was not called).

I miss anything else? I run the 2 applications server and client but the notification does not arrive
 

luisro

Member
Licensed User
But the notification does not arrive to the application b4a, I have much time already with the service in execution.

I am doing something wrong? Do others recommend me for a push server?
 
Upvote 0

luisro

Member
Licensed User
Well, my mistake I think it was in the subject subscription.

Looking in the forum I found a simple example of an app about a chat.

If FirstTime=True Then
CallSubDelayed(FirebaseMessaging, "SubscribeToTopics")
End If

Everything works perfect, I hope you serve others too, greetings.
 
Upvote 0
Top