Most of this sample is stolen from the Android contact sample which uses them. Figured I'd just copy.