android-mqtt-service icon indicating copy to clipboard operation
android-mqtt-service copied to clipboard

QoS for publishing is not working

Open lozuwa opened this issue 6 years ago • 0 comments

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?

lozuwa avatar Nov 06 '17 23:11 lozuwa