Indy Android Guy

Android development perspectives from a guy in Indianapolis

In Like Flynn

clock August 22, 2011 06:15 by author Tyson

It's official, I got into Northwestern for their MS in Predictive Analytics program.  

Now, the decision to enroll is going to be a bit harder than I anticipated.  My employer isn't paying for anything.  So that leaves me with the very real prospect of taking on a bunch of debt for continuing education that may or may not fatten my pockets and provide a solid ROI immediately.  I'm fairly confident it will, though.  I'll be a credentialed 'expert' in my field, and the Northwestern name carries significant weight.  There are more and more predictive analytics projects popping up, as businesses try to get a handle on their customer profiles and risk models.  So even if I'm not using it day to day, it can be leveraged to start a new business, or at the least used as an insurance policy against unemployment in the future.

Hell, I think I just talked myself into enrolling.



Creating your first Android app

clock July 19, 2011 06:13 by author Tyson

Okay, you've got Eclipse installed, you've got the Android SDK installed, and you're ready to create your first Android app.  Firstly, fire up Eclipse.  You'll be prompted to set a working directory, someplace all your project folders are going to live on your filesystem.  You'll also be shown a really webby-1.0-splashy welcome screen.  It's even lamer than Visual Studio's "Start Page", so that's saying something, but I digress....close that welcome screen (it has a tab associated with it in the top left corner, though it's not readily apparent).

Before we create our first project, let's double check that Eclipse knows where the Android SDK is living.  Go to Window-->Preferences, and click on 'Android' in the treeview in the left panel.  Hopefully, you'll see that the SDK Location is set correctly in the right panel, and you should see various Android platforms on the right.  If it is, cancel the dialog.  If not, go ahead and browse to the directory where you installed the Android SDK (generally C:\android-sdk-windows), and hit 'Apply'.  Make sure the list of SDK targets/apis/platforms populates, then hit OK.

Now we're really ready.  Go to File-->New Android Project.  You should see a dialog that looks like the below screenshot.  I've filled in each field so you have an idea of what's required in those fields:

 

Project Name:  Give it a name.  The corresponding project folders in the filesystem will bear this name as well.  You can leave 'Creating a New Project' and 'Use Default Location' selected.  

Build Target:  Which Android devices are you targeting and/or supporting?  If you only want to support Android 2.2 devices, then select 2.2.  If you want to do some fun Google Maps integrations, or any other feature that may requrie accessing some built-in-google-goodness, then choose the 'Google APIs' that correspond to the Android platform you're supporting.  *Note:  If you don't see the Google Apis listed, download them using the Android SDK and AVD Manager, located at Window-->Android SDK and AVD Manager.

Application Name:  This is the name of that app itself.  When the app is installed on a device, this will be the name shown in your Apps tray, under your shiny new icon (which we'll get to later).

Package Name:  The general rule here (not sure who made this rule, but it's definitely recommended by Google) is that you'll want a reverse-order domain name style name here.  

Create Activity:  An Activity is, in Windows-speak is a 'Form' or 'Page'.  Kind of.  Really it's a view controller, a place for all your code that determines what buttons do what, and what should be displayed to the user.

Min SDK Version:  Is terribly redundant.  Note the last column in the list of Android targets in the image above.  It's an API number.  Make sure you choose the API number that corresponds to the Build Target you have selected.

Now hit the Finish button on this dialog.  If you screwed something up, Eclipse is sure to tell you about it on this form.  If not, congratulations, you have just created your first Android project!  Of course, at this point it's as useless as Tom Cruise in a whorehouse, so next we'll work on adding some functionality.



Grad school, perhaps?

clock July 19, 2011 05:56 by author Tyson

As of last Friday, it's official.  I have applied to Northwestern University's graduate school.  I'm hoping to pursue a Masters of Science in Predictive Analytics.  I'll find out in about four weeks if I was accepted.

It seems like the most practical degree for me.  MBAs make a little sense, but those seem to be for guys looking for internal promotions who want to move to the C-level in Ops.  That's not me.  A Master's in Computer Science was considered, but those courses are heavy on theory and building custom tools in low-level languages that have little utility in the real world.  Plus I simply don't have the necessary CS background, which is sad considering I've been designing and building all kinds of applications in the past 10 years.

Northwestern's program has a lot of very attractive features.  Entirely online?  Check.  Relatively inexpensive?  Check.  More business-intelligence than stats oriented?  Check.  I could go on, but suffice to say I really liked the curriculum, the pace, and the cost.  Oh and thank god I didn't have to retake the GRE.

Stay tuned.



Android Unit Testing - Setup Problem

clock June 21, 2011 10:35 by author Tyson

I'm obviously skipping ahead a little bit here, but I wanted to jot down this issue I had today for posterity.  I'm writing unit tests for my Android projects, and according to the Android Testing Documentation, the place to put your Android Test Project is within a manually-added folder named 'tests' that would be in the root directory of the project you want your testing to target.  

Um, no.   Do not do that.

I gave it a try, and was never able to create my Android Test Project within that folder.  I kept getting an error in Eclipse that "Target package name must be specified.", even though I had selected the target project.  In the end, I went ahead and created a new Android Test Project in the same workspace as my existing project, so they are now "side by side" if you will.  

It is also important to note that the Android Test Project project type isn't listed in the File-->New submenu in Eclipse.  You'll have to select 'Other' from the submenu, expand the 'Android' folder, and there you will find the Android Test Project type.



Getting started with Android development

clock June 20, 2011 11:43 by author Tyson

Well, you've decided that you're ready to jump into Android development.  Whether your iPhone app has gone viral, or you've imagined an app that you'd love to have on your new Evo 4G, your foray into Android development needs to begin.  

But first a disclaimer:  MOBILE DEVELOPMENT IS VERY HARD.  The learning curve is steep, particularly if you're coming from the world of Visual Studio and MS development products.  The learning curve is absolutely parabolic for someone who doesn't have much programming experience.  

Now, let's get on with it.  First we'll want to setup our development environment.  

  1. Install Eclipse.  This will be your IDE for Android development.  Specifically, you'll want the "Eclipse IDE for Java developers".  The nice thing about Android development is that your personal computing preference has no bearing on your ability to create and publish apps.  There are Eclipse versions for both 32 and 64 bit versions of Linux, Windows, and OSx.
  2. Install the Android SDK.  These are your building blocks.  I recommend installing it somewhere on your machine that's easy to remember.  The root of your C: drive is an excellent place, and for these tutorials, I'll assume you've installed the SDK in the C:\android-sdk-windows directory.
  3. Install the ADT plugin for Eclipse.  The "Android Development Tools" plugin for Eclipse acts as a bridge between your Eclipse IDE and the Android SDK.  The instructions linked to are very accurate, so I recommend following along carefully.

 

Now you're almost ready to go.  Remember when we installed the Android SDK?  Well, that wasn't the full SDK.  It was basically a little starter package and included a tool called SDK Manager that allows you to pick platform-specific SDK components.  After all, there's no need to grab the Android 1.5 components if you're planning on only targeting Android 2.2 devices.  Our next step is to launch the SDK Manager.  You can do this from Eclipse by going to Window-->Android SDK and AVD Manager, or by going to C:\android-sdk-windows and launching SDK Manager.exe.  If you're on Mac or Linux, navigate to your SDK directory, go into the tools directory, and execute 'android'.

 

 

Go ahead and check off the SDK Platform-tools, and the SDKs for 2.3.1, 2.2, and 2.1.  (According to the Android Device Dashboard, a very small percentage of users are still on 1.5 and 1.6).  Feel free to get the samples here as well.  When you've finished checking off everything you want, click 'Install Selected'.

Congratulations, you're now ready to start developing simple Android applications!  If you have had any problems getting things setup, then I recommend perusing Google's Android Developers website.  It's a great, great resource for both newbies and experience pros.  It's well written, well organized, and not nearly as overwhelming as other support sites (*cough cough MSDN cough*)

Next up....creating your first Android app.



Well, this is it.

clock June 20, 2011 08:34 by author Tyson

I've taken the plunge into blogging.  Up until recently I've been a bit of a snob about blogging, honestly, particularly programming blogs.  I always thought the guys cranking out posts were doing a disservice to programmers everywhere.  Why?  Well, first, it gives the copypasta guys more fuel for their fire, and secondly, it seemed like more guys were using their blogs to market themselves than to actually inform and educate.  Yeah, I know that's cynical as hell.  Which is precisely why I decided that my prior stance on blogging was just plain dumb.  

In the next few months, I'm going to start posting Android-related content, focusing on development.  We'll start small, and focus on how to setup your development environment, and eventually get into more advanced topics like creating RESTful WCF services to handle the server side of your app.



About Indy Android Guy

I'm Tyson Trotter, a thirty-something software engineer.  I'm currently working at Leaf Software Solutions, a high end custom shop in the suburbs of Indianapolis, Indiana.  While this blog will concentrate mostly on Android development, I also have quite a bit of experience in C#, ASP.NET, SQL, and Business Intelligence principles and will comment on those topics from time to time.

Month List

Sign in