Complete
over 3 years ago

Will request to see what can be done about documentation.

Toybox.Position.getInfo() call causes Error: Symbol Not Found Error on fēnix 5X / tactix Charlie

Hello,

I have this code which is run in a watchface onUpdate():

using Toybox.Position as Posn;

var posnInfo = Posn.getInfo();

which is causing an error on a tactix® Charlie watch ( but not the simulator) 

Error: Symbol Not Found Error
Details: "Could not find symbol 'getInfo'"
Time: 2021-06-18T04:50:17Z
Part-Number: 006-B2604-00
Firmware-Version: '22.20'
Language-Code: eng
ConnectIQ-Version: 4.0.3

Positioning Permission is turned on in the manifest.xml.

Now, the API documentation says that the call is supported on fēnix® 5X / tactix® Charlie and doesn't say that it can return null.

What's happening here?  Can it be uncallable when the watchface starts up and then be OK later?

Is it a documentation error?

  • The simulator attempts to act as the device, but its not an emulator. So not everything that happens on the simulator can be reflected on the actual device. That would be an emulator and the resources to do that are not possible at this time.

  • OK. I resolved it by using ActivityInfo.  I would have to say that this is a documentation error.

    I get quite a few situations where customers report a problem that doesn't happen on the simulator.

    I guess in general the Simulator is not running the code of the actual device, but an emulation of it.  Is that a correct statement?

  • The F5x is an odd device as it's got two cores and I think the Tactic C is a variant of that. meaning that a watch face doesn't have access to some stuff.  The common way to get a location is Activity.getActivityInfo().current location and  I never use Position.  On a f5x, currentLocation will be null (as currentHeartrate will be) unless you are selecting a watchface, as that process runs on the main core. but most of the time, it runs on the display core.