Grokking Android

Getting Down to the Nitty Gritty of Android Development

What You Need to Know About the Intents of Android’s Calendar App

By

When your app needs to access calendar data you have to choose whether to use the CalendarContract content provider or whether to use Intents to start specific Activities of the Calendar app. This post covers the intents offered by the official Calendar app. While with using Intents your possibilities are limited compared to those of […]  Continue Reading  “What You Need to Know About the Intents of Android’s Calendar App”

Half a Year of Blogging About Android Development

By

Exactly six months ago I published my “Hello World” post. And one week later my first post with serious content followed: Android: Checking Connectivity. Over the last half year I have continuously blogged and there were only two weeks in which I didn’t publish any posts. According my general feeling my blog progresses nicely. And […]  Continue Reading  “Half a Year of Blogging About Android Development”

iCal’s Recurrence Rule and Duration Formats

By

If you create repeating events in Android using the CalendarContract content provider, the fields for recurrence rules (RRULE) and durations (DURATION) follow the iCal format (RFC 5545). Here I cover the basics of these formats to create valid field values. This post is somewhat of an oddity on this blog as most of its content […]  Continue Reading  “iCal’s Recurrence Rule and Duration Formats”

Android’s CalendarContract Content Provider

By

Android developers have been longing for an official Calendar app and content provider since Android has been released. With the release of Ice Cream Sandwich Google has finally added this feature to our tools list. Now we developers can use the Calendar app from within our Activities using Intents or we can access the data […]  Continue Reading  “Android’s CalendarContract Content Provider”

Useful Android Libraries: Crouton

By

One way to notify users is to use Toasts. But Toasts have the problem that they might pop up in totally unrelated contexts. They are displayed for a defined duration on the screen no matter what the user does. The user might even have changed the app, with the result, that your Toast simply confuses […]  Continue Reading  “Useful Android Libraries: Crouton”

Take These Steps to Make your Android App Accessible

By

Accessibility in an app helps users with disabilities to use your app with the help of the Android system. Android’s accessibility system tools as well as third-party developer’s tools provide features to help with visual impairment. In this post I outline why you should care about accessibility and what steps to take to make your […]  Continue Reading  “Take These Steps to Make your Android App Accessible”

How to Use Loaders in Android

By

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() […]  Continue Reading  “How to Use Loaders in Android”

Android Quick Tip: Enabling and Disabling BroadcastReceivers at Runtime

By

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. […]  Continue Reading  “Android Quick Tip: Enabling and Disabling BroadcastReceivers at Runtime”

Recording Audio using Android’s MediaRecorder Framework

By

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 […]  Continue Reading  “Recording Audio using Android’s MediaRecorder Framework”

Adding Files to Android’s Media Library Using the MediaScanner

By

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 […]  Continue Reading  “Adding Files to Android’s Media Library Using the MediaScanner”