how to get the address of center point of GoogleMap v2 in android?

I following this tutorial to get position of center point of v2 GoogleMap .now I want to get the address of the point using reverse geocoding ….

I am using Following code to get LatLang of center point when button is clicked :

public void onClick(View view) {

        VisibleRegion visibleRegion = map.getProjection()

        Point x = map.getProjection().toScreenLocation(

        Point y = map.getProjection().toScreenLocation(

        Point centerPoint = new Point(x.x / 2, y.y / 2);

        LatLng centerFromPoint = map.getProjection().fromScreenLocation(


I have seen others tutotials to get address using latitude and longitude seperately in my case I have got LatLang ,how to get the address using LatLang..need help here ….if there are others ways to get center point of map and the address of the same point …any kind of help would be appreciated …thank you


I think, you want to pass LatLang as parameters.I solved the problem with following code:

private class ReverseGeoCoding extends AsyncTask<LatLng, Void, String> {
    Context mContext;

    public ReverseGeoCoding(Context context){
        mContext = context;

    // Finding address using reverse geocoding
    protected String doInBackground(LatLng... params) {
        Geocoder geocoder = new Geocoder(mContext);
        double latitude = params[0].latitude;
        double longitude = params[0].longitude;

        List<Address> addresses = null;
        String addressText="";

        try {
            addresses = geocoder.getFromLocation(latitude, longitude,1);
        } catch (IOException e) {

        if(addresses != null && addresses.size() > 0 ){
            Address address = addresses.get(0);

            addressText = String.format("%s, %s, %s",
                    address.getMaxAddressLineIndex() > 0 ? address.getAddressLine(0) : "",

        return addressText;

Hope this will work ourt for you>>>

After editing:

You can follow this and if you are working on Activity Class if you working on Fragment class then the following codes will work for you:

new ReverseGeoCoding(getActivity()).execute(centerFromPoint);