Mobile

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

Android Handling the Unexpected

In all applications, there are those exceptions, those bugs that no one expected.  Try as we might  to think of every conceivable error, exception, or issue, we developers miss some things.  When this happens on a device “out in the wild” – meaning on a device in the hands of the mobile users – we often don’t know it happened, let alone be able to better deal with the problem in the future. Catching the Unexpected – using the UncaughtExceptionHandler… Read More

Android Documentation – Getting a Local Copy

All Android developers know and utilize the Android developer Web site – namely developer.android.com. In particular, the API Guides and Reference (a.k.a. Android Javadocs) are well known and heavily used portions of that Web site.  Did you know, however, that these documents can be downloaded and used on your local development machine?  When disconnected from the Web and designing/developing Android code, this can be quite handy.  How do you get them locally? Download the SDK If you don’t already have… Read More

iOS: Unwind Segues

In iOS 5, we were introduced to Storyboards and Segues.  While these features simplified the navigation process in our apps, we weren’t given a way to define a return to previous modal scenes via Interface Builder. You may have noticed that in iOS 6, a green icon has been added to the control bar of each scene in the Storyboard. This is a new, and surprisingly overlooked feature for iOS 6, which provides the missing “return” functionality.  It’s called an… Read More

Android’s Application Class

“Applications” in Android are .apk files that hold a collection of loosely coupled components.  Rarely do components have direct communication with each other.  Instead, Intents are often used to trigger these components to start.  Components like Activities and Services also have a lifecycle which is heavily controlled by Android.  Meaning the components may exist one moment and be gone the next depending on what the user is doing (hitting a Back button) and what resources (like memory) Android has available… Read More

Twin Cities Mobile March 2013 – Join Us

Tomorrow, I and fellow instructor Jason Shapiro will be speaking at Mobile March 2013.  I believe the conference is a sell out, but if you are attending, I hope you will join us for our talks.  Jason will be speaking at 10:45am on iPhone Core Data.  I am speaking at 3:15pm on Robotium (the Android test framework). Intertech is a Silver Sponsor of the event and I know we’ll have people there to provide you information about Intertech training and… Read More

Introduction & Brief History of Objective-C

Objective-C is an object oriented programming language that is built on top of C. This means both C and Objective-C syntax are used when creating iOS apps. C gives us many built in data types, functions, structs, enumerated data types, and more. Objective-C gives us Classes, Objects, Protocols, Properties, and more. Objective-C was created around 1983 by Brad Cox and Tom Love. The original idea was to add Smalltalk-80 functionality to C. Whereas C was limited to data-only structures and… Read More

Saving (and Retrieving) Android Instance State – Part 2

This is the second post of a two part series of posts dealing with saving and retrieving Android instance state.  In the last post (see here), I explained how onSaveInstanceState( ) / onRestoreInstanceState( ) methods and the Android Bundle object can be used to save and restore instance state from an activity.  In this post, I show you how to use the setRetainInstance( ) method to allow a fragments to retain state. Fragments Fragments were introduced to the Android UI… Read More

Saving (and Retrieving) Android Instance State – Part 1

This begins a two part blog posting dedicated to explaining and exemplifying how Android (activity/fragment) state can be saved and restored.  In this first part, I provide information about the use of onSaveInstanceState( ) and onRestoreInstanceState( ) methods of the activity for saving and restoring state.  In Part 2 of this series (my next post), I will take you through an explanation of a fragment’s setRetainInstance( ) and getRetainInstance( ) methods for managing state.  The setRetainInstance( ) and getRetainInstance( )… Read More

Android Sensor-palooza

Along with being a phone and a platform for all sorts of applications, your Android smartphone or tablet has many capabilities you may not know about.  Did you know your device might be able to tell you what the temperature of the room is or how much light is in the room?  Android devices are typically bristling with a variety of environmental sensors.  These sensors can provide your device with all sorts of data and information that can assist in… Read More