Mobile Archives - Intertech Blog

Android (v5) Lollipop RecyclerView Tutorial

In case you are waking up from a Thanksgiving turkey hangover, Google heralded Android 5 – code named Lollipop – in mid-November. Along with the blog post I made this summer, you can take a look at the Android Developers Blog for a list of the big features in Android 5. This is a release that is worthy of the term “major release” and one I plan on reviewing with you over a series of blog posts in the coming… Read More

iOS Versus Android? Does it Matter?

I was teaching a great class of new Android developers last week. As is typical in this class, a number of my students were debating the merits and shortcomings of the Android and iOS platforms for smartphones and tablets. Which is easier to develop applications for? Which has better features? Which has better security and privacy controls? My students are not alone in this debate. Both Android and iOS have released new versions recently (version 5/Lollipop and iOS 8 respectively) and… Read More

Android Adapters (and AdapterViews)

Android’s Adapter is describe in the API documentation, as “a bridge between an AdapterView and the underlying data for that view” (see here).  An AdapterView is a group of widgets (aka view) components in Android that include the ListView, Spinner, and GridView.  In general, these are the widgets that provide the selecting capability in the user interface (read about AdapterView widgets here).  What is not mentioned in the documentation is that the AdapterView also provides the layout of the underlying data… Read More

Android Non-UI to UI Thread Communications (Part 5 of 5)

This is the last post in my series regarding Android thread communications.  Parts 1 through 4 are linked in below. Part 1 Part 2 Part 3 Part 4 In this series, I have so far outlined four different approaches for how Android non-user interface threads can communicate user interface (UI) updates back to the UI thread.  As you have learned in this series, new threads to perform longer running work is the way to build applications and to avoid Android Not… Read More

Android Non-UI to UI Thread Communications (Part 4 of 5)

In parts 1-3 of this series, I have explored three different means for an Android non-UI thread to communicate user interface updates to the UI thread. The links below are to the series posts. Part 1 Part 2 Part 3 In this fourth installment, I want to show you how to use a broadcasts and a broadcast receiver to provide non-UI to UI thread communications. Background non-UI thread to UI thread comms As background for those jumping into the middle… Read More

Android Non-UI to UI Thread Communications (Part 3 of 5)

Continuing my series on Android non-UI thread-to-UI thread communications, this post covers use of the Handler Framework to facilitate the communications.  See here for Part 1 and Part 2 of the series. Non-UI threads are not allowed to make updates to the UI.  Trying to do too much work (as defined as not allowing the user to interact with the UI for more than 5 seconds) on the UI thread leads to ANR errors.  In the first two posts, I showed how… Read More

Android Non-UI to UI Thread Communications (Part 2 of 5)

This is the second part of my series of blog posts on Android non-UI thread-to-UI thread communications. See here for the start of the series.  As a refresher, this series of posts is about how non-UI threads can communicate back to the UI thread in an Android application in order to update the user interface.  Non-UI threads are not allowed to make updates to the UI.  Trying to do too much work (as defined as not allowing the user to interact… Read More

Android Non-UI to UI Thread Communications (Part 1 of 5)

Android UI Thread and ANR On the Android platform, applications operate, by default, on one thread.  This thread is called the UI thread.  It is often called that because this single thread displays the user interface and listens for events that occur when the user interacts with the app. Developers quickly learn that if code running on that thread hogs that single thread and prevents user interaction (for more than 5 seconds), it causes Android to throw up the infamous Android… Read More

Writing Android Apps on an Android Device – AIDE

First a word for my sponsor It has been more than a couple of months since my last blog post.  For every seven years of employment, my company gives its employees a two month sabbatical.  I just spent my sabbatical traveling Australia and New Zealand!  Below are a couple of pictures from my trip – one of Uluru in Australia and one of the Fox Glacier in New Zealand (If you look close you can see a few dots on the lower… Read More

Programmatically Working with Android Fragments

I had another great class of soon-to-be Android engineers in my class last week.  Some came a very long way to learn Android.  Baris made his first trip to the U.S. all the way from Turkey and Joshua and Doug came up from Mason City, Iowa.  Thanks for making the long trip guys and thanks to all my students (local and long distance) last week for your attendance and participation. During last week’s class, my students learned that Fragments (since Android 3) can be used… Read More