Android: 从 google 处获取照片 api 照片回复

Android: get the photo from google place api photo response

我目前正在构建一个应用程序,该应用程序需要使用 google 个地点 api 的所选地点的照片。我使用

请求了照片
https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference=MY_PHOTO_REF&key=API_KEY

我的问题是如何包含响应并将其显示在 ImageView 中。 提前致谢

看来我明白了。

https://maps.googleapis.com/maps/api/place/photo?maxwidth=[IMAGESIZE]&photoreference=[REFERENCEKEY]&sensor=false&key=[YOURKEYHERE]

这将 return 基于 photo_reference 键的单个图像。