Skip to content

Commit

Permalink
Fixing issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Musyj committed Mar 9, 2014
1 parent 130f125 commit ceb7db1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/android/EstimotePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,14 @@ public void onBeaconsDiscovered(Region region, List<Beacon> beacons) {
public void onServiceReady() {
try {
beaconManager.startRanging(ALL_ESTIMOTE_BEACONS);
PluginResult result = new PluginResult(PluginResult.Status.OK, device);
JSONObject event = new JSONObject();
event.put("event", "connected");
PluginResult result = new PluginResult(PluginResult.Status.OK, event);
result.setKeepCallback(true);
rangingCallback.sendPluginResult(result);
} catch (Throwable e) {
Log.e(LOG_TAG, "Cannot start ranging", e);
this.error(callbackCtx, "Cannot start ranging::" + e.getMessage(), BluetoothError.ERR_UNKNOWN);
EstimotePlugin.this.error(callbackCtx, "Cannot start ranging::" + e.getMessage(), BluetoothError.ERR_UNKNOWN);
}
}
});
Expand Down

0 comments on commit ceb7db1

Please sign in to comment.