I'm making an app that when it opens ,it shows the user's current location.The thing is that I want also to put all the details(home address,postal code,country) by pressing on the marker just like this application Application Photo
Code:
private GoogleMap mMap;
private GoogleApiClient googleApiClient;
private LocationRequest locationRequest;
private Location lastLocation;
private Marker currentUserLocationMarker;
here is the method that contains the marker
@Override
public void onLocationChanged(Location location) {
lastLocation=location;
if(currentUserLocationMarker!=null)
{
currentUserLocationMarker.remove();
}
LatLng latLng= new LatLng(location.getLatitude(),location.getLongitude());
MarkerOptions markerOptions= new MarkerOptions();
markerOptions.position(latLng);
markerOptions.title("Test");
markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.map_marker_mini));
currentUserLocationMarker = mMap.addMarker(markerOptions);
mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
mMap.animateCamera(CameraUpdateFactory.zoomBy(15));
if(googleApiClient != null)
{
LocationServices.FusedLocationApi.removeLocationUpdates(googleApiClient,this);
}
}