Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
fix(mqtt): update disable bluetooth topic
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelje authored and Hector Rondon committed Jan 31, 2018
1 parent 85f2d55 commit 249577b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/src/main/java/org/flyve/mdm/agent/services/MQTTService.java
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,22 @@ public void messageArrived(String topic, MqttMessage message) throws Exception {
FlyveLog.e(ex.getMessage());
}
}

// Policy/disableBluetooth
String DISABLE_BLUETOOTH = "disableBluetooth";
if(topic.toLowerCase().contains(DISABLE_BLUETOOTH.toLowerCase())) {
try {
JSONObject jsonObj = new JSONObject(messageBody);

if(jsonObj.has(DISABLE_BLUETOOTH)) {
Boolean disable = jsonObj.getBoolean(DISABLE_BLUETOOTH);
mqttHelper.disableBluetooth(disable);
}
} catch (Exception ex) {
FlyveLog.e(ex.getMessage());
}
}

}


Expand Down

0 comments on commit 249577b

Please sign in to comment.