Skip to content

A sample app demonstrating a quick workaround to using PahoMQTT in Android Oreo+ using foreground notification

License

Notifications You must be signed in to change notification settings

AZKZero/PersistentMQTTTest

Repository files navigation

PersistentMQTTTest

A sample app demonstrating a quick workaround to using PahoMQTT in Android Oreo+ using foreground notification

Android Arsenal API

Background

  • The PahoMQTT Class is controlled by the singleton ConnectionHolder, which manages the mqttCallback.
  • Due to a restriction on the background services in Android Oreo onwards, the MQTT service is wrapped in the
    NotificationService which is a foreground service with a persistent notification.
  • The notification can be modified, and the sample start button listener can be used to determine how to start the service.

About

A sample app demonstrating a quick workaround to using PahoMQTT in Android Oreo+ using foreground notification

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages