this is an example from android training tutorial.