Android Development: Database Upgrades

This article is part 1 of 11 in the series Android Development

I’ve decied to add a new (occasional) series to this blog which is primarily intended to keep notes on development for the Android platform. I need to write this stuff down somewhere, so I might as well do it here.

In this first installment, I want to deal with upgrades to your app’s database. As you may be aware, the SQLiteOpenHelper class defines a convenient onUpgrade() function, which is called when your database scheme needs upgrading.

Read the rest of this entry »

Android Development: Missing API

This article is part 2 of 11 in the series Android Development

Not for the first time I came across a missing API in Android yesterday. It’s not like you can’t live without it; in most cases you certainly can. But there’s a bit of functionality missing from Android’s View class that would be very handy when trying to extend existing widgets.

Read the rest of this entry »

(Not) Integrating Application with Intents

This article is part 3 of 11 in the series Android Development

Today’s post on the Android Developers Blog annoys me. Titled Integrating Application with Intents, it describes pretty awesome mechanism by which one app can re-use parts of another app’s code, provided both are structured properly.

If you’re technically inclined, head over to that blog for the nitty-gritty of things. It’s pretty well done — and obviously not the part that annoys me.

Read more on PackRat’s blog: (Not) Integrating Application with Intents

Android Activity Lifecycle

This article is part 4 of 11 in the series Android Development

It saddens me to say this, but Android’s Activity Lifecycle is broken by design.

It saddens me, because I enjoy developing for Android, and would like to be able to only say good things about it. But that doesn’t mean there aren’t bad sides either. Read on if any of this is of interest to you.

Read the rest of this entry »

URI Matching in Android’s IntentFilters

This article is part 5 of 11 in the series Android Development

If you’ve done any work on Android that involves integrating apps, you’ll have come across the concept of IntentFilters, too. Put simply, IntentFilters are a means to specify which intents an app’s Activity responds to, so that Android filters out unlikely candidates early.

What’s nifty is that IntentFilters can be used to specify not only what Intent name to react to, but — to a degree — also what data to react to. As this data comes in the form of an URI, you essentially have a means of reacting to URI clicks1.

There’s a problem with that, though.

Read the rest of this entry »

  1. Technically, that’s not correct: while most apps will use a predictable Intent to launch the browser shipped with Android, and this is certainly the recommended way of doing so, there can be no guarantee it actually happens. Apps can just use an internal WebView, much as you’d like use on iOS. []