Getting Longitude and Latitude from Address

Updated 4 August 2017


There are many scenarios in Android development when you need GPS location, address and what not in your android application. For all theses android had provided many things like google Maps library, Geocoder etc. But if you need is the smallest one then using a full fledged library for it. So here we will discuss how can we get the longitude and latitude of an address from address string with the help of a simple google map API. It is the simplest and most effective way as it doesn’t need us to add the library only one API will do it.

So lets start, firstly by overriding the toString() method for our own model so that we can get the address in string representation.

Now as we have the Address object converted to string, lets move on to our next and final step i.e. getting longitude and latitude from this address.


. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.

Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home