aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/io/trygvis/android/bt/BtCallback.java
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-01-11 12:28:55 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2015-01-11 12:28:55 +0100
commit17a1f7227c8c3872fce7bbcc2f5cd46540f9ac52 (patch)
tree20c2c99e710fd1db438a49029177552204a63591 /app/src/main/java/io/trygvis/android/bt/BtCallback.java
parent4a2ca2d94c827566f8682e8dbd6fbdf17d70b4dd (diff)
downloadio.trygvis.soilmoisture-android-17a1f7227c8c3872fce7bbcc2f5cd46540f9ac52.tar.gz
io.trygvis.soilmoisture-android-17a1f7227c8c3872fce7bbcc2f5cd46540f9ac52.tar.bz2
io.trygvis.soilmoisture-android-17a1f7227c8c3872fce7bbcc2f5cd46540f9ac52.tar.xz
io.trygvis.soilmoisture-android-17a1f7227c8c3872fce7bbcc2f5cd46540f9ac52.zip
o Reading values from the soil sensor.
o Rewrote the database schema to match the new device+sensors model. o Storing samples in the database. o To be able to reuse BT callbacks, added a way to always to directly to the next step instead of waiting for an event.
Diffstat (limited to 'app/src/main/java/io/trygvis/android/bt/BtCallback.java')
-rw-r--r--app/src/main/java/io/trygvis/android/bt/BtCallback.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/src/main/java/io/trygvis/android/bt/BtCallback.java b/app/src/main/java/io/trygvis/android/bt/BtCallback.java
index 8dab149..71f7d56 100644
--- a/app/src/main/java/io/trygvis/android/bt/BtCallback.java
+++ b/app/src/main/java/io/trygvis/android/bt/BtCallback.java
@@ -4,16 +4,18 @@ import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattDescriptor;
-import static io.trygvis.android.bt.BtPromise.*;
+import static io.trygvis.android.bt.BtPromise.PromiseResult;
public class BtCallback {
+ public final boolean stopOnFailure;
public final String name;
- public BtCallback(String name) {
+ public BtCallback(boolean stopOnFailure, String name) {
+ this.stopOnFailure = stopOnFailure;
this.name = name;
}
- public PromiseResult onConnectionStateChange(BluetoothGatt gatt, int newState) {
+ public PromiseResult onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {
throw new NotOverriddenException();
}
@@ -49,6 +51,10 @@ public class BtCallback {
throw new NotOverriddenException();
}
+ public PromiseResult onDirect(Object value) {
+ throw new NotOverriddenException();
+ }
+
public void onFailure() {
throw new NotOverriddenException();
}