Android BluetoothLeGatt Write Sample

This sample demonstrates how to use write a value to a characteristic when you click on the characteristic in the list.

Introduction

This sample shows a list of available Bluetooth LE devices and provides an interface to connect, display data and display GATT services and characteristics supported by the devices.

It creates a Service for managing connection and data communication with a GATT server hosted on a given Bluetooth LE device.

The Activities communicate with the Service, which in turn interacts with the Bluetooth LE API.

Pre-requisites

  • Android SDK 28
  • Android Build Tools v28.0.3
  • Android Support Repository

Screenshots

Screenshot Screenshot

Getting Started

This sample uses the Gradle build system. To build this project, use the "gradlew build" command or use "Import Project" in Android Studio.

Support

If you've found an error in this sample, please file an issue: https://github.com/android/connectivity

Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.