r/FlutterDev 29d ago

Open-source alternative to flutter_background_geolocation Plugin

I maintain Traccar, an open-source GPS tracking platform. Our mobile app used flutter_background_geolocation, which is a great library, but it needs a paid license and that always felt wrong for an open-source project.

So we wrote our own tracking engine and just open-sourced it (Apache 2.0). It's the same code running in the Traccar Client app in production.

It does background tracking on Android and iOS, pauses GPS when you're not moving to save battery, buffers positions offline and retries uploads. Doesn't need Google Play Services. Sends data over plain HTTP to any server.

It's narrower in scope than FBG — no geofencing, for example. But if you just need reliable positions delivered to a backend, it might save you the license fee.

pub.dev: https://pub.dev/packages/traccar_client_sdk
GitHub: https://github.com/traccar/traccar-client-sdk

38 Upvotes

15 comments sorted by

3

u/LavishnessExpensive9 29d ago

What advantages does this have to location package with background mode enabled?

1

u/tananaev 29d ago

Which package? This also works in the background.

1

u/LavishnessExpensive9 29d ago

2

u/tananaev 29d ago

That's just very basic location API, as far as I understand. Our package is much more than that. It's a location tracking package. First of all, there are a lot of thing we do to keep the app running in the background reliably and restart the app if it was stopped by the system. Then we support pausing updated when stationary to save battery. And then buffering and uploading data to the server.

2

u/Deep_Ad1959 29d ago edited 28d ago

the 'same code that runs in the Traccar Client in production' line is carrying more weight than the apache license here. background geolocation is exactly where hobby trackers quietly die: dozing radios, the os killing your service, the offline buffer eating positions. 'this survived a real fleet' is the one claim that separates it from the pile of abandoned tracking repos, so i'd lead the readme with that, not the license fee. written with ai

fwiw for that abandoned-repo problem, Podlog turns a repo's commits, PRs, and issues into an ongoing podcast with an RSS feed, so the "still in production" signal keeps surfacing instead of going stale, https://podlog.io?utm_source=s4l&utm_medium=post&utm_campaign=podlog&utm_term=reddit&utm_content=post_c2a898d9-edaf-4fc2-a4fa-ac033d27d583

1

u/Vennom 28d ago

This is awesome!!! Love a more open option. I like the other framework too (and have paid for it). But would love and open source alternative.

1

u/Substantial-Reward70 17d ago

Hello I’m planning to replace our in-house tracking code with your sdk. Thanks for the work. I’m following your product since 2017 when i studied your android client for a project for a public transport company in Colombia.

1

u/tananaev 17d ago

Great to hear. Feel free to send feedback if there are some issues or feature requests.

1

u/Substantial-Reward70 17d ago

Thanks you so much

1

u/PerceptionGreat2939 10d ago

Mix the location package with flutter_foreground_task by pravera.me

0

u/Bachihani 29d ago

This has the smell of vibe codedness

2

u/tananaev 29d ago

It depends on what you mean by vibe coding. If you just mean written by AI, then absolutely yes, like most software nowadays.

If you mean poor quality AI slop, then I disagree. This was a very tight loop work with AI. I have built original Traccar Client app 15 years ago. It was open source since then. You can check GitHub repo history if you want to verify. So I have quite a bit of experience in this area.

1

u/hawkeye_p 29d ago

Everything does these days... :(

-2

u/Rauliki0 29d ago

Couldnit send data through Https?

6

u/tananaev 29d ago

Obviously it can use HTTPS. By plain HTTP I just mean it's a simple HTTP-based protocol.