Hi All,
I have created a skill using ASK SDK with Node.js. In that I have used device address API (getDeviceAddressServiceClient) to get the full address of the customer device.
Right now I'm trying to get the geo-coordinates by enabling the location permission in settings and modify the logic by adding the sample code in the docs(https://developer.amazon.com/docs/custom-skills/location-services-for-alexa-skills.html)
context.Geolocation
var isGeoSupported = context.System.device.supportedInterfaces.Geolocation;
var geoObject = context.Geolocation;
if (isGeoSupported) {
var ACCURACY_THRESHOLD = 100; // accuracy of 100 meters required if (geoObject && geoObject.coordinate && geoObject.coordinate.accuracyInMeters < ACCURACY_THRESHOLD ) { console.log(geoObject); // Print the geo-coordinates object if accuracy is within 100 meters }
}
When I try to invoke the skill intent, it returns undefined for both isGeoSupported
and geoObject
and in the log it shows the supportedInterfaces attributes of device object return empty
2019-02-07T13:42:31.738Z 503fbe25-71d2-47a4-ac1b-7ad8cdbb9bcf
{ "deviceId": "amzn1.ask.device.AHC6DQBCQLEU7775V3FWM3WGTDIMHYWM342TM4M7VR3FIDA2PE564ONQYOEMGZ4V44JF76C54PYYGEFPLENFVYWV4XTUPFDJJVOBQ7UGES5OQWU4FMTDP4UKXSGI6MPI", "supportedInterfaces": {} }
Expecting your support to resolve this issue.
Thanks,
Jude