Location on Google Glass

五迷三道 提交于 2019-12-21 05:16:12

问题


Is it possible to get the user's location without using the Mirror API?
The hacking glass Google I/O video mentioned several android apis currently work and listed gps as one of them, however I have not had luck so far. I know Glass does not have GPS itself and must use the paired phones GPS. Would be awesome if we could use existing android location manager or newer Google play services location apis!


回答1:


Yes, you can - if you use the GDK examples as a base and follow the Location Strategies (http://developer.android.com/guide/topics/location/strategies.html).

For a specific example, I just posted a hack of the GDK Compass sample in answer to another question that adds location updates pulled from the GPS (with or without a paired phone):

Can GPS for Glass be accessed through the Android SDK?




回答2:


Google Glass does NOT have a GPS chip in it. I don't see why you could not have an apk that uses the LocationManager and add a listener to it that would print out the latitude and longitude in Logcat or even on GLASS itself. Now, to get that location to a remote user, that would require more work than not using the Mirror API.



来源:https://stackoverflow.com/questions/18343373/location-on-google-glass

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