code for http://developer.android.com/training/index.html