Skip to content
This repository was archived by the owner on Apr 9, 2020. It is now read-only.

Fixed client.publish function #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/src/main/java/com/tuanpm/RCTMqtt/RCTMqtt.java
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public void publish(final String topic, final String payload, final int qos, fin
try {
encodedPayload = payload.getBytes("UTF-8");
MqttMessage message = new MqttMessage(encodedPayload);
client.publish(topic, message);
client.publish(topic, message,qos,retain);
} catch (UnsupportedEncodingException | MqttException e) {
e.printStackTrace();
}
Expand Down Expand Up @@ -372,4 +372,4 @@ void log(String message) {
}


}
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react-native-mqtt",
"name": "react-native-mqtts",
"version": "0.1.0-beta4",
"description": "MQTT client for react-native",
"main": "index.js",
Expand All @@ -8,17 +8,17 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/tuanpmt/react-native-mqtt.git"
"url": "git+https://github.com/aashizpoudel/react-native-mqtt.git"
},
"keywords": [
"mqtt",
"reactnative",
"iot"
],
"author": "Tuan PM <tuanpm@live.com> (http://tuanpm.net)",
"author": "Aashiz Poudel",
"license": "MIT",
"bugs": {
"url": "https://github.com/tuanpmt/react-native-mqtt/issues"
"url": "https://github.com/aashizpoudel/react-native-mqtt/issues"
},
"homepage": "https://github.com/tuanpmt/react-native-mqtt#readme"
"homepage": "https://github.com/aashizpoudel/react-native-mqtt#readme"
}