Code from android_tutorial_pubsub example