Courier For Flutter Is Here!
Add Courier, the information superhighway, to your cross-platform Mobile Apps!
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.
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:
- Kotlin/Java on Android: courier-android
- Swift/Objective-C on iOS: courier-iOS
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).
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.
Courier libraries also provide events for tracking end-to-end message delivery and connection lifecycle.
Courier provides QoS 1 & QoS 2 messages in case the user is offline when sending those messages
The client can optionally listen to system events such as connection success, failure, connection lost, message received and many more for analytics tracking.
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.
We have also written a five-part series covering Courier background and usage in Gojek for your weekend tech reading!
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: