Recipe Retrieving Last Location

Because it might take time to produce a location estimation, getLastKnownLocation() can be called to retrieve the location last saved for a given provider. The location contains a latitude, longitude, and Coordinated Universal Time (UTC) timestamp. Depending on the provider, information on altitude, speed, and bearing might also be included (use getAltitude(), getSpeed(), and getBearing() on the Location object to retrieve these and getExtras() to retrieve satellite information).The latitude and longitude are displayed to the screen in this recipe.The main activity is shown in Listing 10.3.

Character Building Thought Power

Character Building Thought Power

Character-Building Thought Power by Ralph Waldo Trine. Ralph draws a distinct line between bad and good habits. In this book, every effort is made by the writer to explain what comprises good habits and why every one needs it early in life. It draws the conclusion that habits nurtured in early life concretize into impulses in future for the good or bad of the subject.

Get My Free Ebook


Post a comment