语言

Menu
Sites
Language
Accessing GPS data through HumanActivityManager.

I have been trying to access GPS data of samsung galaxy watch through HumanActivityManager. I have added the "location" and "healthInfo" privilages and "humanActivitymonitor","location.batch","location.gps" features. My code:
 

tizen.humanactivitymonitor.start('GPS');
function onsuccessCB_gps(gpsInfo) {
    console.log("GPS lat : " + gpsInfo.latitude);
    console.log("GPS long : " + gpsInfo.longitude);
    console.log("GPS alti : " + gpsInfo.altitude);
    console.log("GPS speed : " + gpsInfo.speed);

  }

function onerrorCB(error) {
    console.log('Error occurred: ' + error.message);
  }

tizen.humanactivitymonitor.getHumanActivityData('GPS', onsuccessCB_gps, onerrorCB);

My watch location service is also on. I have set it to "wireless and GPS".

But i am getting an error on output. It says "Error getting current location".

Any help would be appreciated.

响应

1 回复
Christof Meerwald