Bees in the cities
Urban gardens may support bees by providing resources in otherwise resource-poor environments. For example, community garden throughout New York City attract a wide variety of bee species, and urban parks in San Francisco attract more bees and more bee species than larger parks outside the city, suggesting that urban areas can provide important food and nesting resources.
Recent studies developed in Chicago and northwestern Ohio, United States, have shown that bee richness and abundance have a positive correlation with local characteristics of backyard gardens, such as increased floral abundance, taller vegetation, more cover by wood plants, less cover by grass, and larger vegetable gardens; and also that abundance of all bees is greater in native plant gardens.
In Chicago were documented 37 bee species and 79 flowering plant genera across all neighborhoods. They also found that both the abundance and richness of bees increases in neighborhoods with higher human population density, as did visitation to potted purple coneflower heads (Echinacea purpurea). In more densely populated neighborhoods, bee communities shifted to a suite of species that carry more pollen and are more active pollinators in this system, including the European honey bee (Apis mellifera), and native species such as Agapostemon virescens (pictured). These neighborhoods also had a greater diversity of flowering plants, suggesting that the positive relationship between people and bees was mediated by the effect of people on floral resources.
So … If you want to contribute in your city to the conservation of bees, try to have a garden (no matter how small) or simply pots outdoors, preferably with native species of flowering plants, and if you have grass, keep your garden regularly pruned.
References:  - 
Photo credit: ©Rick | Locality: Vineyards, Florida, US (2007)