An open API service indexing awesome lists of open source software.

https://github.com/liboyang0112/smac

A Simple MQTT Android Client. Simple to use: Fill in host, user and password, and press connect.
https://github.com/liboyang0112/smac

android client mqtt

Last synced: about 2 months ago
JSON representation

A Simple MQTT Android Client. Simple to use: Fill in host, user and password, and press connect.

Awesome Lists containing this project

README

          

# MQTT Notifier for Android

![SMAC Demo](assets/demo.jpg)

https://github.com/liboyang0112/smac.git

A lightweight foreground service-based Android app that listens to MQTT messages and shows instant notifications. Perfect for home automation alerts, IoT monitoring, or remote logging and debugging.

Built with Kotlin, `MqttAndroidClient`, and foreground services to ensure reliable delivery β€” even when the app is in the background.

> βœ… Releases are tested on Redmi K50.

---

## πŸš€ Features

- πŸ”” Real-time MQTT message notifications
- πŸ” Supports username/password authentication
- πŸ“± Persistent foreground service (won’t die in background)
- πŸ”Š High-priority notifications with vibration
- 🎯 Auto-reconnects on network loss
- 🧩 Clean Kotlin + Coroutines architecture
- πŸ’‘ Toggles connect/disconnect from UI
- πŸ”„ Survives app restarts (`START_STICKY`)

---

## πŸ“· How It Works

1. App connects to your MQTT broker (e.g., Mosquitto, EMQX, HiveMQ).
2. Subscribes to a topic like `notifications/warning`.
3. When a message arrives, it shows a default-priority notification.
4. Runs in foreground with persistent notification to avoid being killed.

---

## πŸ“„ License & Ownership

This project is Β© 2025 Boyang Li.
All rights reserved except as granted under the [Mozilla Public License 2.0 (MPL-2.0)](LICENSE).

- βœ… You are free to use, modify, and distribute this app.
- πŸ”’ Modifications to original files must remain open under MPL-2.0.
- 🚫 Do not repackage and sell this app as your own product.
- πŸ™ Please credit the original author if used in public projects.