|
|
|
@ -176,14 +176,8 @@ public class DataPublisherService extends Service {
|
|
|
|
|
if (!mqttTransportHandler.isConnected()) {
|
|
|
|
|
mqttTransportHandler.connect();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String topic = "wso2/" + LocalRegistry.getTenantDomain(context) + "/" + SenseConstants
|
|
|
|
|
.DEVICE_TYPE + "/" + deviceId + "/data";
|
|
|
|
|
String topic = LocalRegistry.getTenantDomain(context) + "/" + SenseConstants.DEVICE_TYPE + "/" + deviceId + "/data";
|
|
|
|
|
mqttTransportHandler.publishDeviceData(user, deviceId, jsonArray.toString(), topic);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} catch (JSONException e) {
|
|
|
|
|
Log.e(TAG, "Json Data Parsing Exception", e);
|
|
|
|
|