Need help with push notifications

Lykourgos4 years ago

Hi, i can't seem to be able to get push notifications working.
I have created a firebase project and linked it to the app, i can see in the analytics that it has been installed.
I built the googlerelease flavor and tried the googledebug flavor on the emulator, I can see in the account attributes that the token has been registered.
But when i try to manualy send a notification from firebase nothing arives, i even tried sending the notification via traccar by adding the following lines in traccar.xml with the secret key i got from firebase and then setting and trigering some notifications but i still got nothing.

<entry key='notificator.types'>web,mail,firebase</entry>
<entry key='notificator.firebase.key'>FIREBASE_SERVER_KEY</entry>

Anyone have any ideas what i may be doing wrong or any sugestions ?
Thanks in advance.

Anton Tananaev4 years ago

Any errors in the logs? Have you tried to send notifications directly with firebase to make sure it's not an app issue?

Lykourgos4 years ago

I tried directly sending it from firebase, but i got nothing.
Any specific logs i should look at ?

Anton Tananaev4 years ago

If you don't get notification directly from firebase, then the issue is probably on the app side. Try following this guide:

https://firebase.google.com/docs/cloud-messaging/android/first-message

I'm sure you can find more information on the Firebase website. They also probably have some way of debugging events.

Lykourgos4 years ago

I got it to work! Thanks for your help !
After updating all the android studio libraries to the latest version it started working normally, although for some reason it will not send notifications from firebase by manually sending one, but it is working flawlessly via traccar.