iGenius-Srl / android-mqtt-service

MQTT service for Android
Apache License 2.0
42 stars 24 forks source link

QoS for publishing is not working #8

Open lozuwa opened 6 years ago

lozuwa commented 6 years ago

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?