Grokking Android

Getting Down to the Nitty Gritty of Android Development

Surprising Statistics on Library Usage in Android Apps

By 2 Comments

AppBrain published statistics on library usage on Android. This list of libraries is very interesting and to me quite surprising. These stats are presented on three tabs: “Ad networks”, “Social SDKs” and “Development tools”. Here I care about development tools only. For example the two most-used libraries are those of the leading analytics providers, Google […]  Continue Reading  “Surprising Statistics on Library Usage in Android Apps”

How Android’s AutoCompleteTextView Nearly Drove me Nuts

By 5 Comments

AutoCompleteTextView is a nice widget Android provides. It helps the user enter text by presenting him possible selections based on what he has entered so far. Nicolas Klein has written a nice introduction of AutoCompleteTextView. As a short recap: You have to provide a ListAdapter that also must implement the Filterable interface. The filterable adapter […]  Continue Reading  “How Android’s AutoCompleteTextView Nearly Drove me Nuts”

Android’s ContentProviderOperation: “withBackReference” explained

By 14 Comments

The class ContentProviderOperation.Builder has a method named withValueBackReference(String key, int previousResult). The API states ominously “Add a ContentValues back reference. A column value from the back references takes precedence over a value specified in withValues(ContentValues)”. Now, thank you, Google! That about explains everything! Android’s documentation is never short of surprises. A lot of stuff is […]  Continue Reading  “Android’s ContentProviderOperation: “withBackReference” explained”

Android Tutorial: Writing your own Content Provider

By 48 Comments

This is the last part of a three part tutorial on content providers. In this post I am going to show you how to write your own content provider. I covered the common concepts of content providers in my first post of this series. And in the second part I’ve covered how to use content […]  Continue Reading  “Android Tutorial: Writing your own Content Provider”

Weird error message in Android’s MergeCursor

By Leave a Comment

For an app I am working on I needed a MergeCursor to use search in a meaningful way. I needed to use two combine two cursors from different sources and I was going to merge them. The only major difference between the code for both cursors was the projection map I used to transform the […]  Continue Reading  “Weird error message in Android’s MergeCursor”

Android: Getting Notified of Connectivity Changes

By 9 Comments

In a previous posting I have explained how you can check the device’s current connectivity status. But this is only a temporary snapshot of the status. It might change anytime – and it probably will, given the volatility of a mobile environment. Thus you want to know whenever the connectivity state changes. Thankfully Android’s ConnectivityManager […]  Continue Reading  “Android: Getting Notified of Connectivity Changes”