This is an example available online for Android Application Dev.