3

Currently i am creating an application for the samsung gear s smartwatch using tizen web application (javascript). My widget/app needs to get location data (it's a safety application) everywhere. The basic GPS location works fine as you can see in my code below. The problem is that GPS only works outside, since my app is a safety app i need to get location everywhere. On phones you are able to use Wifi and mobile network to get location. My question is is it possible to get location data using wifi or mobile network on a smartwatch (the samsung gear s has mobile network and wifi connection so you would think that it is possible)? and if it's possible how.

My code for the basic GPS location using HTML 5 geolocation:

function getBestGPSLocation(){  
    //GPS
    navigator.geolocation.getCurrentPosition(success, error, {maximumAge:60000, timeout:5000});
    //Wifi

    //Mobile Network
}   
function error(error) {
// just some error codes they work either
switch(error.code) {
    case error.PERMISSION_DENIED:
        console.log("permission denied");
        break;
    case error.POSITION_UNAVAILABLE:
        console.log("your position is unavailable");
        break;
    case error.TIMEOUT:
        console.log("a timeout occured");
        break;
    case error.UNKNOWN_ERROR:
        console.log("an unknow error occured");
        break;
    }
}

function success(position) {
// this works i get all the data
   alert(position);
   alert(position.coords.latitude);
}
thegendolz
  • 29
  • 5
  • 1
    After searching a lot, the simple answer to this question is basically no. You are not able to get location data using wifi or mobile network using the smartwatch. – thegendolz Mar 11 '15 at 14:44
  • Thank you. Can you elaborate on how you came to the conclusion? (link to resources/documentation etc...) – Juan Carlos Ospina Gonzalez Dec 09 '15 at 19:19
  • With Gear S2 we were able to take location only when the watch is connected to mobile device via bluetooth and samsung gear. – Priya Nov 08 '16 at 10:24

0 Answers0