My name is Juri Strumpflohner and this is my technical blog. I'm a software architect, .Net, Android, Web and Java dev, TDD and best practices promoter and martial arts practitioner.

Recent Posts Subscribe

Dear reader of Juri's TechBlog,
I moved my blog to a new domain and a new hosting solution as well. I'm now blogging on juristr.com.

Getting Started with Android Development

Android has become very popular recently, especially among developers which would like to create some nice apps for mobile environments. This trend can be noted also when looking at the Android category on Stackoverflow. There are a lot of quite simple, introductory questions regarding Android development. Generally speaking, I'd say this is positive :). A lot of interest from the developer community means more apps on the market (forget about the app quality for now ;)).


Today I answered a question about how to get started with Android. Normally I could straight point you to developer.android.com. Google has a lot of very good articles and tutorials there. Here's how I started about more than a year ago with Android (the quoted answer from Stackoverflow):

Least Invasive Approach to Gain Root Access on the Nexus One

For my current Android research project I needed to copy an APK to the /system/app folder. Now for that you need root rights. Well, that shouldn't be a problem, right? There are dozens of apps out there which allow you to root your Android phone and put one of the available custom ROMs on it. For some devices there are one-click procedures available (i.e. Unrevoked), for others it may turn out to be a really painful story, especially if you run into the situation where you have done a system upgrade where no exploit for rooting has yet been found.
Anyway, in my case I really wanted to find the least invasive approach, mainly because the phones weren't mine but those of my testers. Hence, unlocking the bootloader, flashing a custom ROM etc isn't really what I aimed for. I was looking for a possibility to root a Nexus One with Android 2.2.1 FRG83D on it and guys...there's a jungle of forum posts out there, some working, others are obsolete due to system upgrades and so on... Finally I found a solution that works just amazingly. Here are the requirements for the following to work:

Deploy Android APK OTA Using Symbolic Links and Dropbox

Couple of time ago I wrote a blog post describing how you can use Dropbox for deploying your Android APK basically over-the-air to your device. That involved copying your APK to a dedicated Dropbox folder that can then be accessed from your Android device to install it.

Instead of copying manually, on Unix based systems (Linux, OSX,..) you can also make use of symbolic links.

  1. Open the terminal.
  2. Navigate to your Dropbox folder where you want to have your APK file
  3. type ln -s </path-to-your-apk/ApkName.apk> <ApkName.apk>
For example consider I have my Android project at /Users/Juri/Projects/MyProjName, then I would create a link that looks like
ln -s /Users/Juri/Projects/MyProjName/bin/MyProjName.apk MyProjName.apk
Every time I build my project inside Eclipse, a new APK will be created which will then automatically be uploaded to Dropbox.

(If you don't have Dropbox you can get an invitation with 250MB additional storage space here)

Coding an Update Functionality for your Android App

An immediate answer would be: why should I need that. I publish my app on the market which has a build-in update functionality. Totally true :). The need for such a functionality arose when I wrote the Android app for my current MSc thesis research. The application was never intended to be published on the market, but rather it was just thought for internal use. However, providing some kind of intuitive update mechanism is crucial for being able to release bugfix upgrades or add new features. The same may hold for you as well, for instance in the case where you develop an app for a company which doesn't want it to be released on the official Android market. Or you want to implement different "channels" (as Chrome does it), marking an app as an early release version which will be updated through your own mechanism to a dedicated set of beta testers.

FriendlyBool Extender What?

From now and then it happens that I have to databind some entities onto the UI, containing boolean datatypes like "Married" or "Editable" and so on. Printing out "true" or "false" is not really user friendly, so normally what is being done is to have some kind of if clauses like

if (Person.Married == true)
{
  return "Yes";
}
else
{
  return "No";
}
Obviously this repeats as more people have to do that. So why not create a nice C# extender on boolean types :)