Updated for SDK 2.2 and API 1.0