Want to Implement Push Notifications - using traccar server on my Flutter App

Furqan Mughal a month ago

Hey,
Please guide me to put me on track,
I want to register my Flutter App on Traccar Server to receive push notifications which Traccar server sending on Traccar manager App.
I want to get that same notifications like Enter/Exit Zones...etc
Some RND done by me:

  1. Enable push notification on Traccar Server in default.json in notification section under push add Firebase Server key.
  2. Register App with Firebase and get .json for android and .plist for ios.
  3. Get FCM and send in Post: api/users/{userid}/tokens/
{
type: "firebase",
token: "device_fcm_token"
}

Are these steps are valid or did i am on wrong track ?

Furqan Mughal a month ago

Can i register Traccar Push Notification with my Flutter App's (Android & iOS)?
Anyone ?

Anton Tananaev a month ago

Yes, you can.

Furqan Mughal a month ago

Last thing, Can i mute / unmute them from my Flutter app.
Basically we are creating a Notification Settings Screen so that user can select which type of notifications he wants from Server and mute others.
Also this too possible ?

Anton Tananaev a month ago

You can delete them and add, of course.

Furqan Mughal a month ago

Ok Thanks
Do i have to create a firebase project for this ?

Anton Tananaev a month ago

Yes, of course.

Furqan Mughal a month ago

Ok Thanks

Furqan Mughal 21 days ago
"notifications": {
"push": {
"type": "firebase",
"apiKey": "YOUR_FIREBASE_SERVER_KEY"
}
}

Hey, We have to set our Projects Firebase Server key on Traccar Server in file "conf/default.json"
Firebase Server key also send by our clients who purchased the server to your support email to set firebase server key on Traccar Server so that Push Notifications can work ?

Furqan Mughal 21 days ago

Anyone up for help ?

Anton Tananaev 21 days ago

I don't see any emails.

Also, you need a service account, not an API key.

Furqan Mughal 21 days ago

Don't get it, You said previously we must have firebase account for notifications right?
If Traccar Support team don't need firebase_server_key then how Traccar Server know about our Firebase and pushing notifications. Also where do we have to send our device fcm token to be registered ???
Client will send you an email soon.
After enabling service etc... Traccar Support team provide some extra api's endpoints or somethings else ?

Anton Tananaev 21 days ago

I strongly recommend reading the official documentation.

Furqan Mughal 21 days ago

Can you please share document link as you shared before for Social Login earlier.

Anton Tananaev 21 days ago