firebase traccar 5.5 push notifications

Wanderson 3 years ago

Hi! I'm having trouble receiving push notifications after upgrading to 5.5 previously I used 4.13 I changed the firebase settings, but I still can't receive... The .jar file is from the 5.5 package! Email,web and sms are ok!.

Anton Tananaev 3 years ago

Have you updated your Firebase configuration?

Wanderson 3 years ago
    <entry key='notificator.types'>mail,sms,firebase,web</entry>

    <entry key='mail.smtp.host'>mail.example.com</entry>
    <entry key='mail.smtp.port'>587</entry>
    <entry key='mail.smtp.starttls.enable'>true</entry>
    <entry key='mail.smtp.from'>noreply@example</entry>
    <entry key='mail.smtp.auth'>true</entry>
    <entry key='mail.smtp.username'>noreply@example.com</entry>
    <entry key='mail.smtp.password'>******</entry>
	
	<entry key='sms.http.url'>https://www.traccar.org/sms/</entry>
	<entry key='sms.http.authorization'>ytAr7eiaC*****************B2AotuMZW</entry>
	<entry key='sms.http.template'>
	    {
	        "to": "{phone}",
	        "message": "{message}"
	    }
	</entry>
	
	<entry key='notificator.firebase.serviceAccount'>
	{
	  "type": "service_account",
	  "project_id": "*****-app",
	  "private_key_id": "****d1784837****",
	  "private_key": "-----BEGIN PRIVATE KEY-----\*********************\n-----END PRIVATE KEY-----\n",
	  "client_email": "firebase-adminsdk-hym5s@*******-app.iam.gserviceaccount.com",
	  "client_id": "114***************",
	  "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": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-hym5s%40******-app.iam.gserviceaccount.com"
	}
	</entry>
Anton Tananaev 3 years ago

Assuming the service account is configured correctly, it looks fine. Do you get any errors when you test it?

Wanderson 3 years ago

No errors, arrives normally on other channels

Anton Tananaev 3 years ago

If there are no errors it means that Google server has accepted the notification, so there's probably some other issue. Maybe you haven't upgraded your mobile app?

Wanderson 3 years ago

I haven't updated my mobile app, I will! Thanks.

Amal Kumar 3 years ago

Hello, iam useing custome android app, I am removing fcm token from user table while logout, but somehow still able to get the notifications.
Could you please help me solve this.

Wanderson 3 years ago

@Amal Kumar Removing notifications or notification permissions on your profile, wouldn't that be a simple way?