aboutsummaryrefslogtreecommitdiffstats
path: root/java/direct_bt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-05-28 06:10:14 +0200
committerSven Gothel <[email protected]>2020-05-28 06:10:14 +0200
commitec8b75e18b2fabadd23f60539ee5fdfb76bd6c1f (patch)
tree4fe6bdfce7ac4018c948cda96f885a9db5691c44 /java/direct_bt
parent6997c572ae5a72a9fae5843a01984028b9de2afb (diff)
DBTGattCharacteristic: Added commented out code to detect notify/indicate properties
Diffstat (limited to 'java/direct_bt')
-rw-r--r--java/direct_bt/tinyb/DBTGattCharacteristic.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/java/direct_bt/tinyb/DBTGattCharacteristic.java b/java/direct_bt/tinyb/DBTGattCharacteristic.java
index 944167ef..ad92d226 100644
--- a/java/direct_bt/tinyb/DBTGattCharacteristic.java
+++ b/java/direct_bt/tinyb/DBTGattCharacteristic.java
@@ -54,6 +54,8 @@ public class DBTGattCharacteristic extends DBTObject implements BluetoothGattCha
/* Characteristics Property */
private final String[] properties;
+ // private final boolean hasNotify;
+ // private final boolean hasIndicate;
/* Characteristics Value Type UUID */
private final String value_type_uuid;
@@ -132,7 +134,23 @@ public class DBTGattCharacteristic extends DBTObject implements BluetoothGattCha
super(nativeInstance, handle /* hash */);
this.service = service;
this.handle = handle;
+
this.properties = properties;
+ /** {
+ boolean hasNotify = false;
+ boolean hasIndicate = false;
+ for(int i=0; !hasNotify && !hasIndicate && i<properties.length; i++) {
+ if( "notify".equals(properties[i]) ) {
+ hasNotify = true;
+ }
+ if( "indicate".equals(properties[i]) ) {
+ hasIndicate = true;
+ }
+ }
+ this.hasNotify = hasNotify;
+ this.hasIndicate = hasIndicate;
+ } */
+
this.value_type_uuid = value_type_uuid;
this.value_handle = value_handle;
this.clientCharacteristicsConfigIndex = clientCharacteristicsConfigIndex;