Monthly Archives: August 2010

Using SQLite Transactions with your ContentProvider

In the world of databases, a transaction is a unit of work (including insertions, deletions, updates) that is Atomic, Consistent, Isolated, and Durable. By default in SQLite, each insertion is a transaction. And to preserve data integrity, SQLite will wait … Continue reading

Posted in Android | Tagged , , , , , | 2 Comments

CursorAdapter with Alphabet-indexed Section Headers

Hey everyone, today I would like to share how to organize a CursorAdapter into sections alphabetically. It works as long as your queries in the Cursor are alphabetically sorted (so the sortOrder parameter of your query is ASC by the … Continue reading

Posted in Android | Tagged , , , , , , , , | 79 Comments

Persisting Cookies through Activity Life Cycle

If you are coding an Android REST application using the Apache HttpClient, there may be times when you bring another application into the foreground (like Google Maps to get driving directions), and the process containing your application is killed because … Continue reading

Posted in Android | Tagged , , , , , | 2 Comments

Converting a Hex String to N-bit Binary String

Recently I have wanted to keep track of unique IDs of the Android devices using one of my applications. These are found under Settings.Secure.ANDROID_ID and are 64bit numbers given as Hex Strings, but I needed the actual binary number, with … Continue reading

Posted in Programming | Tagged , , , | 1 Comment