You need to replace the project id with yours, not b4a-test1.Thanks Mr. mcpueccu
It seam that required file.
But I can't run the App. it gave me the following error in the Logs tab :
View attachment 156981
I hope to solve this
and Hope to find Php to send firebase with this new key.
best regards
I changed the Project id the error removed and the Jave file created, but no notification fired at all.You need to replace the project id with yours, not b4a-test1.
What is the code you use to send the notification?but no notification created at all,
Beside to create the project, did you enabled the Firebase Cloud Messaging V1 API?I changed the Project id the error removed and the Jave file created, but no notification fired at all.
I even create new projects:
- First Firebase project at firebase.google.com and :
- Create B4A project as Notification receiver,
Did you see any error message in the log?- Re-create FCMPush java project with "Project id" and "---.json" file.
but no notification created at all,
I can't catch the problem,
any help please ?
by the way if any have php script as a pusher for notification , please
Thanks sir for your attention and reply.Beside to create the project, did you enabled the Firebase Cloud Messaging V1 API?
Did you see any error message in the log?
B4A Firebase Push Notifications 2023+ Sending
how to send Firebase Push Notifications 2023+ Message from B4A i use this (https://www.b4x.com/android/forum/threads/b4x-firebase-push-notifications-2023.148715/) B4J work fine for sending ,when try same code with B4A get (java.lang.ClassNotFoundException...www.b4x.com
you can put the code into the trashbin.I write a separate php based on the above link with the last function
But it to work you need to get a AccessToken first.https://fcm.googleapis.com/v1/projects/${ProjectId}/messages:send
What is the code you use to send the notification?
Did you updated it to use the new B4J Sending tool? It is a mandatory step you have to follow.
Did you try to use the Sending Tool on your PC to test if it works?
based on the Screenshot he provided the new api seems to be activated. See #8I put this question "did you enabled the Firebase Cloud Messaging V1 API?" and you don't answer.
Yes, I used B4J sending project and add the additional libraries, and changed all requested parameters as:May I ask if you have tested with B4J Sending Tool?
Have you really read the link pointed to you 6x?
I guess you have ignored them.
Then?Yes, I used B4J sending project and add the additional libraries, and changed all requested parameters as:
- ProjectId As String = "addplayer-12345"
- ServiceAccountFilePath As String "d:/1234/456798.json"
the filename doesn´t matter.Do you rename the file name for the json file?
Dim GoogleCredentials As JavaObject
GoogleCredentials.InitializeStatic("com.google.auth.oauth2.GoogleCredentials")
Dim Credentials As JavaObject = GoogleCredentials.RunMethodJO("fromStream", Array(File.OpenInput(FilePath, ""))) _
.RunMethod("createScoped", Array(Array As String("https://www.googleapis.com/auth/firebase.messaging")))
I know but I afraid the OP use the wrong json file that suppose to be use in B4A.the filename doesn´t matter.
ohhh. I didn´t realized this fact.I know but I afraid the OP use the wrong json file that suppose to be use in B4A
Yeah ?Funny things can happen you know?
This Logs mean the notification is successfully sent! (last value with name key)Really many thanks for your support.
and I'm so sorry for your times.
I still haven't any notifications until now.
- I used B4J push project and change project-id, and
- The key is active.
- I don't re-generate B4A (receiver) (I need to regenerate it ? (it worked well in the past).
- The log output (attached) and it seem worked well.
Please see the Log result from B4J push project.
View attachment 157051
If you hope to share any other things (please inform me to share it).
Best regards
Thanks Mr. Aeric.This Logs mean the notification is successfully sent! (last value with name key)
I can't tell whether your payload is correct or not since you didn't provide the full Logs.
Again, please please please read the tutorial and change your FirebaseMessaging service to FirebaseMessaging receiver.