Is it possible to show Google map view on Android Wear?

二次信任 提交于 2019-12-22 10:36:32

问题


Is it possible to show Google map view on Android Wear? I want to show a particular location to user on map.


回答1:


You may manage to embed a MapView in your activity, but it won't work as Android Wear does not have direct access to the network.

However, what you can do is using the Static Maps API.

  1. Your Wear app should send a Message to your phone application
  2. Your phone application downloads a bitmap of the map you want thanks to the static maps api
  3. Your phone app sends back the image to the wear app
  4. You show the bitmap in the wear application with an ImageView

The maps static API is quite powerful, and will allow you to do almost anything, including adding markers at the positions you want.

I have implemented such a system in an application, so I can guarantee you it'll work




回答2:


I dont think that this is possible. Your host app on the mobile could generate a map picture and send it to the watch. I think the same way the navigation preview on the watch is working.



来源:https://stackoverflow.com/questions/24796920/is-it-possible-to-show-google-map-view-on-android-wear

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!