custom app push notification not work from the traccar server and work from firebase console

jamesa year ago

Hi,
thanks for your time and effort.
we have an issue with the traccar when working with traccar manager Android app to customize it.
the setup of the firebase on the app works when I send the notification from the Firebase console and I'm using the googleDebug flavor.
I've added the configuration in the XML

<entry key='notificator.types'>web,mail,firebase</entry>
<entry key='notificator.firebase.serviceAccount'>
  {
  "type": "......",
  "project_id": "......",
  "private_key_id": "......",
  "private_key": "-----BEGIN PRIVATE KEY-----......\n-----END PRIVATE KEY-----\n",
  "client_email": "......",
  "client_id": "......",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "......"
  }
</entry>

and no error is shown when sending the test notification from the server but it does not arrive.
what else should I check?

Anton Tananaeva year ago

Check the notification token. Try generating a new one. Confirm that both app and backend are pointing to the same firebase project.

jamesa year ago

I checked the firebase project they both pointed to it, but I didn't get it for the token I searched but still not found what the token that you mention, can you please give me any resource that could help
again thanks for your time

Anton Tananaeva year ago

When you login from a mobile app, it adds a notification token to the user attributes.

jamesa year ago

yeah thats work, I did delete the app fully and build it again then the token got generated and everything works perfectly, thanks for the help!