concept address in category android

This is an excerpt from Manning's book Android in Action, Third Edition.
Figure 1.7 shows the sample application in action. Someone looked up the address of the White House; the result shows the White House pinpointed on the map.
Beyond the buoy application requirements, you’ll also write a few samples for working with the Geocoder class. This class allows you to map between a GeoPoint (latitude and longitude) and a place (city or postal code) or address. This utility doesn’t help much on the high seas but does benefit many other apps.
The Android documentation describes geocoding as converting a “street address or other description of a location” into latitude and longitude coordinates. Reverse geocoding is the opposite—converting latitude and longitude into an address. To accomplish this, the Geocoder class makes a network call to a web service.
You won’t use geocoding in Wind and Waves because the ocean doesn’t contain cities, addresses, and so on. Nevertheless, geocoding provides invaluable tools when working with coordinates and maps. To demonstrate the concepts surrounding geocoding, this listing includes a new single Activity application, GeocoderExample.
You create a Geocoder by constructing it with the Context of your application
. You then use a Geocoder to either convert String instances that represent place names into Address objects with the getFromLocationName() method
or convert latitude and longitude coordinates into Address objects with the getFromLocation() method
.
Figure 11.8 shows our GeocoderExample in use. In this case, we’ve converted a String describing Wrigley Field in Chicago into an Address object containing latitude and longitude coordinates.

This is an excerpt from Manning's book Android in Practice.
Wait, you say. Can’t a URL represent an address to any kind of server, not just HTTP? Correct! As it turns out, HttpURLConnection inherits from the more generic URLConnection, which represents a general-purpose data connection to some server using some protocol. Now, how does URL know what kind of connection to return? The simple answer is that it depends on the URL’s scheme (such as http). A protocol handler class looks at the scheme and tries to find a matching connection implementation. The Java class library (and Android) already provides protocol handlers for all common schemes such as HTTP(S), FTP, MAILTO, FILE, and so on, so typically you don’t have to worry about that. This also means that you’re free to create your own protocol handlers that instantiate your own custom URLConnection, but this is something you rarely need to do, so we’re not going to cover it here.
Now it’s your turn. Once you learn about the location-related APIs and capabilities that the Android platform provides, you can use them to create the next great location-aware application. To that end, in this chapter we’ll start with a primer on geospatial coordinates and how location-based services work. Then we’ll look at the specific LocationProvider implementations that Android includes. These provide multiple ways to determine location, each with potentially different capabilities. We’ll access the providers, determine what is and isn’t available, and set up listeners for location-based services through the LocationManager. We’ll also explore some other location features such as converting an address into coordinates and vice versa using the Geocoder class.
We now have a collection of brew location data taken from the Beer Mapping Project—we have the addresses but not the coordinates of each location. Our next problem is to turn those addresses into latitude and longitude coordinates so we can plot them on a map.
. You then use a Geocoder to either convert String instances that represent place names into Address objects with the getFromLocationName() method
or convert latitude and longitude coordinates into Address objects with the getFromLocation() method
.