Skip to Content
IoT Projects with Bluetooth Low Energy
book

IoT Projects with Bluetooth Low Energy

by Madhur Bhargava
August 2017
Intermediate to advanced
278 pages
6h 1m
English
Packt Publishing
Content preview from IoT Projects with Bluetooth Low Energy

Application code

So far so good. At the end of previous step, we hope that you have included the earlier mentioned files in your code preferably in a separate package. Now, we start writing our App:

  1. We shall create a simple UI, which is nothing much but just a text view on a screen to display our Beacon data. For this, navigate to the activity_main.xml file in the design view and drag and drop a textView. Apply constraints and position the text view to the top of the screen:
Figure 14: Adding the TextView
  1. Our very basic UI is ready. Now, we need to scan and discover the Beacon first. For this, create a class by the name of BleUrlDeviceDiscoverer ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Getting Started with Bluetooth Low Energy

Getting Started with Bluetooth Low Energy

Kevin Townsend, Carles Cufí, Akiba, Robert Davidson

Publisher Resources

ISBN: 9781788399449Supplemental Content