Mobile Archives - Intertech Blog

JSON Service Mocks

  I am working with a client right now to build Android and iOS applications we hope to have posted to Google Play and the Apple Store before the end of the summer.  Like many mobile applications these mobile apps are going to be dependent on some communications with the organization’s HTTP/HTTPS servers for some information and services – in our case the exchange will be via JSON.  Unfortunately, the mobile application development is underway while the backend services are… Read More

Android Development Tutorial: Lollipop CardView

Android 5 has now been out for almost 2 months.  Devices with Android 5 are starting to appear.  No doubt, if you are an Android developer you are studying the new features and API.  Take a look at some of my previous posts in this blog site for Android development tutorials on some of Android 5’s features. Lollipop Notifications RecyclerView getAppTasks() CardView CONCEPT In this Android development tutorial, we take a look at the new CardView.  CardView was another widget type added… Read More

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 described 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