Archive for September, 2012

How to Use Loaders in Android

With the introduction of Honeycomb Loaders became the preferred way to access data of databases or content providers. They load data asynchronously and notify listeners when the results are ready. Google did not only introduce Loaders but also deprecated the previous way to handle a Cursor within your activities. You shouldn’t use startManagingCursor() or managedQuery() […]

Android Quick Tip: Enabling and Disabling BroadcastReceivers at Runtime

BroadcastReceivers are good when you want to be notified about system events. But sometimes you do need to know about an event only once or for a short period of time. A dynamically registered receiver doesn’t cut it because the Activity and it’s dynamically registered broadcast receiver might long be dead when the event occurs. […]

Recording Audio using Android’s MediaRecorder Framework

Sometimes your app needs the ability to record and store audio files. As most devices come with a microphone it’s no surprise that Android offers app developers the possibility to do so. This post deals with the two most common ways to record audio on Android. Recording audio using an Intent As usual that’s by […]

Adding Files to Android’s Media Library Using the MediaScanner

When you add files to Android’s filesystem these files are not picked up by the MedaScanner automatically. But often they should be. As far as I can tell from a cursory search through Android’s codebase, Android runs a full media scan only on reboot and when (re)mounting the sd card. This might sound bad at […]

Subscribe to RSS Feed My G+-Profile Follow me on Twitter!