Send and receive push notifications to Android devices over a persistent MQTT connection.
Stream real-time order status updates from a backend server to a mobile app.
Implement device-to-server signalling for IoT or mobile apps that need low-latency messaging.
Build chat or messaging features that rely on a lightweight pub/sub protocol instead of HTTP polling.
Requires implementing a bridge interface and initializing in your Application class; depends on Eclipse Paho MQTT client and Android framework.
pulse-droid is a Kotlin library from Zomato that wraps the Eclipse Paho MQTT client to make it easier to use inside Android apps. MQTT is a lightweight messaging protocol commonly used for things like push notifications, real-time order updates, or device-to-server signalling, where small messages move between an app and a broker over a long-lived connection. The library is published as a kit called PulseMqttKit and the README is mostly an integration guide for Android developers. You start by creating an instance of PulseMqttKit inside your Application class and calling initialize, passing in a context and a bridge object that you implement. The bridge lets the library reach back into your app for things like the logger you want to use, a Gson instance for JSON, a coroutine scope, a health monitoring config, and a network monitoring config. This means the library does not force a particular logging or serialization choice on the host app. All MQTT actions go through a command submission model rather than direct method calls. There are ConnectCommand, PublishCommand, SubscribeCommand, UnsubscribeCommand, and DisconnectCommand types, each submitted with pulseMqttKit.submitCommand. Commands can declare dependencies on other commands, so for example you can attach a ConnectCommand as a dependency of a SubscribeCommand and the subscribe will only run if the connect succeeds first. Each command also takes a retry policy: Sequential for fixed intervals, Exponential for back-off, Jitter for adding randomness so many clients do not retry at the exact same moment, or None to disable retries. You can exclude specific MQTT exception codes, like NOT_AUTHORIZED, from retry attempts. The connection options can include an AutoSubscriptionConfig with a map of topics and the message types and quality of service levels you expect on each. When this is enabled, the library re-subscribes to those topics on its own after a reconnect, so you do not have to resend SubscribeCommands yourself. You can also register listeners that receive results for each command, including how many retry attempts were used and the total execution time, and unregister them when done. For staying connected over time, the library has a health monitoring system that can run periodic checks through either Android's AlarmManager or Jetpack WorkManager and reconnect automatically if the link drops. A shutDown call disconnects and clears all listeners. The README is published as plain documentation with example code; no license is shown in the clipped portion.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.