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

Collecting weather forecast data


Now that our application's user interface is completed, we can proceed to implement the logic to store the user's location while fetching weather data from the RESTful web service. This implementation could be organized in the following steps:

  1. Update the Preset class to store the user's location.

  2. Handle voice recognition results when the user clicks on the weather_status TextView parameter.

  3. Add a new scheduled thread that fetches weather data and updates the user interface using the onWeatherChanged() callback.

We start updating the Preset class and realizing it with the following steps:

  1. Add, at the top of the class, the highlighted declaration used as a key to store and retrieve the location set by users:

    private static final String CURRENT_PRESET = "__CURRENT__";
    private static final String CURRENT_LOCATION = "__LOCATION__";
    
  2. At the bottom of the class, add the following setter to store the given location:

    public static void setLocation(Context ctx, String name...
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