Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Getting started with Udoo
  • Toc
  • feedback
Getting started with Udoo

Getting started with Udoo

By : Emanuele Palazzetti
4.8 (4)
close
Getting started with Udoo

Getting started with Udoo

4.8 (4)
By: Emanuele Palazzetti

Overview of this book

If you are an Android developer who wants to learn how to use UDOO to build Android applications that are capable of interacting with their surrounding environment, then this book is ideal for you. Learning UDOO is the next great step to start building your first real-world prototypes powered by the Android operating system.
Table of Contents (10 chapters)
close
9
Index

Improving the boiler with an antifreeze check


Now that the forecast fetching is up and running, we can proceed with implementing the antifreeze feature. To achieve the interaction and the logic previously discussed, we should:

  1. Enhance the Preset class storing the user's antifreeze setpoint. In this class, we should provide two utilities to disable the antifreeze check and to find out whether the feature is enabled or not.

  2. Handle the antifreeze feature in the Overview activity, updating the user interface when a setpoint is selected.

  3. Update the boiler logic in the SensorThread class so it takes into account the antifreeze check when it's enabled.

We begin our work by changing the Preset class with the following steps:

  1. At the top of the class, add the highlighted declarations:

    private static final String CURRENT_LOCATION = "__LOCATION__";
    private static final String CURRENT_ANTIFREEZE = "__ANTIFREEZE__";
    private static final float ANTIFREEZE_DISABLED = -Float.MAX_VALUE
    

    We use the ANTIFREEZE_DISABLED...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete