diff --git a/README.md b/README.md index 2a99e3b..83a2c6e 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ hosted on a given Bluetooth LE device. The Activities communicate with the Service, which in turn interacts with the [Bluetooth LE API][2]. +schema + [1]:http://developer.android.com/reference/android/app/Service.html [2]:https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html diff --git a/img/schema.svg b/img/schema.svg new file mode 100644 index 0000000..bd15d76 --- /dev/null +++ b/img/schema.svg @@ -0,0 +1,382 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BluetoothLeService + + + + + + + + BluetoothAdapter + + + + + + + + + + + + + + + + + + + + + + + + + + DeviceScanActivity + + + + + + + + + + + + + + + + SimpleDetailActivity + + + + + + + + + + + + + + + + + + + + + isEnabledstartLeScanstopLeScan + + + + + + + + + + + + + mLeScanCallback { onLeScan} + + + + + + + + + + + + + onCreate onResume onPauseonOptionsItemSelectedonListItemClick + + + + + + + + + + + + + initializeconnectgetPrivateServicereadCharacteristicwriteCharacteristicsetCharacteristicNotification + + + + + + + + + + + + + + + + + + + + mGattUpdateReceiver { onReceive} + + + + + + broadcastUpdate + + + + + + CONNECTEDDISCONNECTEDSERVICES_DISCOVEREDSENSOR_VALUE_AVAILABLEWRITABLE_VALUE_AVAILABLE + + + + + + + + + + + + + + + + + + + + startActivity + + + + + + onCreate + + + + + + + + + + + + + onResume onPauseonDestroyonOptionsItemsSelectedonBackPressedonRefreshClickonSendClick + + + + + + + + + + + + + finish + + + + + + + + + + + + + onResume + + + + + + + + + + + + + getRemoteDevice + + + + + + + + BluetoothGatt + + + + + + + + + + + + + connectdiscoverServicesgetServicegetServicesreadCharacteristicsetCharacteristicNotificationwriteCharacteristicwriteDescriptorclosedisconnect + + + + + + + + + + + + + mBluetoothCallback { onConnectionStateChanged onServicesDiscovered onCharacteristicRead onCharacteristicWrite onCharacteristicChanged} + + + + + + + + \ No newline at end of file