Bluetooth Low Energy
in Android
Set up Bluetooth Low Energy (BLE)

Get Bluetooth Adapter :

Enable Bluetooth :
Find BLE Devices

To find BLE devices, you use the startLescan() method

mLeScanCallback is the interface used to deliver ...
Connect to GATT server
The first step in interacting with a BLE device is connecting to it— more
specifically, connecting ...
Connect to GATT server
The BLE app provides an activity (DeviceControlActivity) to connect, display
data, and display GATT...
Read BLE Attributes
Once your Android app has connected to a GATT server and discovered
services, it can read and write at...
Close Client (Android App)

Once your app has finished using a BLE device, it should call close() so the system can
releas...
Thank you!

Reference :
http://developer.android.com/guide/topics/connectivity/bluetooth-le.html#connect

8
Upcoming SlideShare
Loading in...5
×

Bluetooth low energy

762
-1

Published on

Summary for Bluetooth low energy technology - Android 4.3 or above.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
762
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Bluetooth low energy

  1. 1. Bluetooth Low Energy in Android
  2. 2. Set up Bluetooth Low Energy (BLE) Get Bluetooth Adapter : Enable Bluetooth :
  3. 3. Find BLE Devices To find BLE devices, you use the startLescan() method mLeScanCallback is the interface used to deliver BLE scan results
  4. 4. Connect to GATT server The first step in interacting with a BLE device is connecting to it— more specifically, connecting to the GATT server on the device. To connect to a GATT server on a BLE device, you use the connectGatt() method. • A Context object, autoConnect (boolean indicating whether to automatically connect to the BLE device as soon as it becomes available), and a reference to a BluetoothGattCallback • connectGatt() used for connecting to the GATT server • BluetoothGatt instance, which you can then use to conduct GATT client operations • The Android app is the GATT client • The BluetoothGattCallback is used to deliver results to the client
  5. 5. Connect to GATT server The BLE app provides an activity (DeviceControlActivity) to connect, display data, and display GATT services and characteristics supported by the device. Based on user input, this activity communicates with a Service called BluetoothLeService, which interacts with the BLE device via the Android BLE API.
  6. 6. Read BLE Attributes Once your Android app has connected to a GATT server and discovered services, it can read and write attributes. Receive GATT Notifications It's common for BLE apps to ask to be notified when a particular characteristic changes on the device. Once notifications are enabled for a characteristic, an onCharacteristicChanged() callback is triggered if the characteristic changes on the remote device
  7. 7. Close Client (Android App) Once your app has finished using a BLE device, it should call close() so the system can release resources appropriately
  8. 8. Thank you! Reference : http://developer.android.com/guide/topics/connectivity/bluetooth-le.html#connect 8
  1. ¿Le ha llamado la atención una diapositiva en particular?

    Recortar diapositivas es una manera útil de recopilar información importante para consultarla más tarde.

×