Update OsMoControlDevice.java
This commit is contained in:
parent
de85e9042f
commit
3bfa6dcd42
1 changed files with 1 additions and 2 deletions
|
@ -57,7 +57,6 @@ public class OsMoControlDevice implements OsMoReactor {
|
||||||
public boolean acceptCommand(String command, String id, String data, JSONObject obj, OsMoThread tread) {
|
public boolean acceptCommand(String command, String id, String data, JSONObject obj, OsMoThread tread) {
|
||||||
if(command.equals("REMOTE_CONTROL")) {
|
if(command.equals("REMOTE_CONTROL")) {
|
||||||
if(data.equals("BATTERY_INFO")) {
|
if(data.equals("BATTERY_INFO")) {
|
||||||
String rdata = getBatteryLevel()+"";
|
|
||||||
try {
|
try {
|
||||||
service.pushCommand("BATTERY_INFO|"+getBatteryLevel().toString());
|
service.pushCommand("BATTERY_INFO|"+getBatteryLevel().toString());
|
||||||
} catch(JSONException e) {
|
} catch(JSONException e) {
|
||||||
|
@ -66,7 +65,7 @@ public class OsMoControlDevice implements OsMoReactor {
|
||||||
} else if(data.equals("VIBRATE")) {
|
} else if(data.equals("VIBRATE")) {
|
||||||
Vibrator v = (Vibrator) app.getSystemService(Context.VIBRATOR_SERVICE);
|
Vibrator v = (Vibrator) app.getSystemService(Context.VIBRATOR_SERVICE);
|
||||||
// Vibrate for 500 milliseconds
|
// Vibrate for 500 milliseconds
|
||||||
v.vibrate(500);
|
v.vibrate(1000);
|
||||||
} else if(data.equals("STOP_TRACKING")) {
|
} else if(data.equals("STOP_TRACKING")) {
|
||||||
tracker.disableTracker();
|
tracker.disableTracker();
|
||||||
if (app.getNavigationService() != null) {
|
if (app.getNavigationService() != null) {
|
||||||
|
|
Loading…
Reference in a new issue