android-mqtt-service
android-mqtt-service copied to clipboard
QoS for publishing is not working
Hello, I have been using this code to publish messages:
public void publishMessage(String topic, String message) { final int qos = 2; byte[] encodedPayload = new byte[0]; try { encodedPayload = message.getBytes("UTF-8"); MQTTServiceCommand.publish(getActivity(), topic, encodedPayload, qos); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } }
Nonetheless, when I receive messages with MQTTlens, the qos is still 0 for the sent messages. Is this a problem of the service?