Open HawkiesZA opened 3 years ago
LocalBroadcastManager
is a lot more efficient than global broadcasting through context. With the latter if the massage payload is too big - it will throw a TransactionTooLargeException
.
While that may be true, LocalBroadcastManager doesn't appear to have a way to address the problem of locking up the UI thread as explained above. I think this may just be a quick fix under the current situation, but actually we should be looking at a different pattern rather than BroadcastManagers, considering that LocalBroadcastManager has been deprecated as well.
Use HiveMqtt instead of paho..its better maintained.
When setting a new callback, messages are received on the UI thread. This completely locks up the UI if there are lots of messages being received. This has been discussed before here: https://github.com/eclipse/paho.mqtt.android/issues/207, but it seems that the solution was never implemented.
Please make sure that the following boxes are checked before submitting your Pull Request, thank you!