Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #76 from g-ortuno/no-changes
Browse files Browse the repository at this point in the history
App behaves correctly when there are no changes to the beacon
  • Loading branch information
schilit committed Dec 2, 2014
2 parents 63c2b81 + b01064b commit 6cfb5fd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ public void writeUriBeacon(ConfigUriBeacon configUriBeacon) throws URISyntaxExce
if (configUriBeacon.getLockState()) {
mLastUUID = LOCK;
}
// If there are no changes or the only change is that the beacon was unlocked, return.
if (mLastUUID == null) {
mUriBeaconCallback.onUriBeaconWrite(BluetoothGatt.GATT_SUCCESS);
}
// Start enqueing writes
if (!configUriBeacon.getUriString().equals(mConfigUriBeacon.getUriString())) {
mService.writeCharacteristic(DATA, configUriBeacon.getUriBytes());
Expand Down

0 comments on commit 6cfb5fd

Please sign in to comment.