Writing central-side Android apps

We will continue our Bluetooth Scanning application created in the previous section.

  1. Upon configuring the server, the app should list the advertising peripheral in the list:
Scanner App is showing the configured server with the MAC C0:E9:DE:07:AE:AE
  1. Since the activity is a ListView, we can implement onListItemClick() method to capture the clicks on the list of the Bluetooth devices:
 @Override protected void onListItemClick(ListView l, View v, int position, long id) { final BluetoothDevice device = mLeDeviceListAdapter.getDevice(position); Toast.makeText(this, "Device: " +device.getName() + " and address: ...

Get Building Bluetooth Low Energy Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.