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