I am passing data between two activities. I want to do this: when the user long clicks on the map the new InfoActivity window opens, displaying latitude, longitude and the city where the longclick was made.
I already passed lat and long, but got stuck with the city part.
@Override
public void onMapLongClick(LatLng arg0) {
Intent intent = new Intent(getActivity(), InfoActivity.class);
intent.putExtra("latitude", arg0.latitude);
intent.putExtra("longitude", arg0.longitude);
startActivity(intent);
}
How would I get the city where the map is long clicked and add pass it to my InfoActivity.
Any help is appreciated :)