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!
Asked
Active
Viewed 2,429 times
4

Patrick Jackson
- 18,766
- 22
- 81
- 141
-
Google Glass runs Android. Use the Android SDK. – Jared Burrows Feb 02 '14 at 05:28
-
Do Google Glasses have GPS built in (without paired phone)? I read multiple opposite answers about it. – Cœur Apr 07 '14 at 08:22
2 Answers
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):
0
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.

Clocker
- 1,316
- 2
- 19
- 29
-
1
-
Because It does not have a GPS chip, you cannot use location manager at all. – Amalan Dhananjayan Oct 04 '13 at 04:41
-
1That is incorrect. I have successfully had Glass send messages to a remote server with its latitude and longitude with the use of Location Manager and a LocationListener. Glass is Android... – Clocker Oct 04 '13 at 17:30
-
Yah you may be right but, it needs your phone to be paired with it. And can you please post you code snippet. – Amalan Dhananjayan Oct 05 '13 at 05:42
-
1Glass might also get the location based on the WiFi connection. The code works exactly like it does in Android. I had an android app that incorporated the location listener and I installed it on Glass. I ran the app and it worked like a charm. – Clocker Oct 06 '13 at 16:28