O'Reilly logo

IoT Projects with Bluetooth Low Energy by Madhur Bhargava

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Android

We begin by creating an empty project by the name of AndroidWarehouseMonitor.

  1. We begin by defining the user interface to display the current temperature and humidity values on the screen. To do this, we define our UI by updating the activity_main.xml file. Remove whatever code is present in this file and you can either add the following code directly to the activity_main.xml file or add the UI via the UI editor:
<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="android.packt.com.androidwarehousemonitor.MainActivity"> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required