Courier For Flutter Is Here!


By Alfian Losari

Courier is the information superhighway for making persistent connection between client and server. Since we open sourced Courier Client Libraries for Android & iOS, we’ve been focusing on adding Flutter support using both libraries as foundation.

Courier is our solution to provide a real-time, lightweight, and highly efficient messaging highway between mobile apps and servers using MQTT.

Why Flutter, you ask?

Flutter is a very popular framework for building mobile apps with nearly half a million apps released. Considering that staggering number of apps, we also want to contribute to the Flutter Community by releasing the official Dart Library so Courier can also be used in building Flutter Apps.

GitHub - gojek/courier-flutter: Dart port of our popular courier library
Dart port of our popular courier library. Contribute to gojek/courier-flutter development by creating an account on GitHub.
courier_dart_sdk | Flutter Package
Flutter SDK for Courier

With Courier Dart library, one can create a long-running persistent connection to any MQTT broker targeting Android and iOS platforms. Under the hood, we call platform-specific native APIs that depends on Courier library:

  1. Kotlin/Java on Android: courier-android
  2. Swift/Objective-C on iOS: courier-iOS
Courier Flutter Dart Method Channel 

Features

Quality of Service

All Courier libraries support three QoS levels for reliable message delivery: 0 (at most once), 1 (at least once) and 2(exactly once).

Automatic Reconnect

All Courier libraries are able to reconnect automatically whenever there are network or other unexpected failures using a connection retry policy.

Clean & easy to understand APIs

All Courier libraries provide clean APIs for connect/disconnect, subscribe/unsubscribe and publish/receivefunctionalities. The APIs are simple and easy to understand.

Observability

Courier libraries also provide events for tracking end-to-end message delivery and connection lifecycle.

Disk Persistence

Courier provides QoS 1 & QoS 2 messages in case the user is offline when sending those messages

Event Provider

The client can optionally listen to system events such as connection success, failure, connection lost, message received and many more for analytics tracking.

Documentation

All Courier Libraries are well-documented with examples. We host the documentation in GitHub Pages.

You can read more about Courier from our GitHub pages . We have also covered Android & iOS libraries in detail in our blog posts.

Courier · Information Superhighway

We have also written a five-part series covering Courier background and usage in Gojek for your weekend tech reading!

Introducing Courier - The Information Superhighway Between Mobile & Server - 5 min read
Here’s how we built Courier, a persisting connection through which we’re able to push content from our server to the app.

Thanks for reading and we look forward to your feedback. Contributions to the library are welcome!

How to reach out?

You can join our discord server to connect with the team behind this amazing project.

Find more stories from our vault, here.
Check out open job positions by clicking below: