/android-samples

Talk to Your Toaster Accessory Sample Code

Primary LanguageJavaMIT LicenseMIT

Android Examples

The sample code is licensed under the MIT Open Source License

Introduction

Examples include:

  • BluetoothAdvertiser
  • BluetoothScanner
  • BluetoothGatt

BluetoothAdvertiser

This sample demonstrates use of the Bluetooth Low Energy (BLE) Advertisement APIs.

BluetoothAdvertiser allows the user to toggle BLE Advertising of that device. It broadcasts basic information about the device along with a UUID specific to this app so the Scanner on other devices can filter by it.

BluetoothScanner

This sample demonstrates use of the Bluetooth APIs. BluetoothScanner allow the user to scan the device which is BLE or BR/EDR .

BluetoothGatt

This sample demonstrates how to use the Bluetooth LE Generic Attribute Profile (GATT) to transmit data between devices. The functionality is split into two activities - one for GATT client, one for GATT server.

You will need two devices to see this sample in action.

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.