Search code examples
androidgpswear-osmoto-360

Android wearable GPS on moto 360 gen 1


I would like to develop a app on the moto 360 that gets the users current gps coordinates, is this possible even though they say it doesnt have built in gps connectivity? The reason I ask is it also says you can "track your watches location".. How would this be possible if it doesnt have gps? Does it just use the host device for this?


Solution

    1. Is this possible even though they say it doesnt have built in gps connectivity?

    Yes it is possible, based on the document "Detecting Location on Android Wear":

    Location awareness on wearable devices enables you to create apps that give users a better understanding of their geographic position, movement and what's around them.

    Some wearable devices include a GPS sensor that can retrieve location data without another tethered device. However, when you request location data in a wearable app, you don't have to worry about where the location data originates; the system retrieves the location updates using the most power-efficient method. Your app should be able to handle loss of location data, in case the wear device loses connection with its paired device and does not have a built-in GPS sensor.


    1. How would this be possible if it doesnt have gps? Does it just use the host device for this?

    It is possible for wearable devices to rely on a tethered connection for location data.

    How to check for on-device location sensors, receive location data, and monitor tethered data connections.

    • Connect to Google Play Services
    • Request Location Updates
    • Detect On-Board GPS
    • Handle Disconnection Events
    • Synchronize Data

    NOTE:

    Not all wearables have a GPS sensor. If your user goes out for a run and leaves their phone at home, your wearable app cannot receive location data through a tethered connection. If the wearable device does not have a sensor, you should detect this situation and warn the user that location functionality is not available.

    Wearable devices relying on a tethered connection for location data may lose their connections abruptly. If your wearable app expects a constant stream of data, you must handle the disconnection based upon where that data is interrupted or unavailable. On a wearable device with no onboard GPS sensor, loss of location data occurs when the device loses its tethered data connection.

    In cases where your app depends on a tethered data connection for location data and the wear device does not have a GPS sensor, you should detect the loss of that connection, warn the user, and gracefully degrade the functionality of your app.

    Wear device without a built-in gps will depend on the paired handheld gps to get or be aware of its location.

    Hope this helps!