function compute(info) permissions error

Former Member
Former Member
A DF can read Toybox::Activity::Info::currentLocation in compute(info), but when trying to read Toybox::Activity::Info::currentLocationAccuracy (in the simulator), I get a permission required exception. Is this working as intended?

  • More details are needed, such as is this the sim or device, and which device is the target or you see this on. What's the actual error you see, and maybe post the code involved?

    By any chance, are you comparing the accuracy and using one of the Position constants? You can't use Position in a data field, and that will throw a permissions error.
  • Former Member
    Former Member
    > By any chance, are you comparing the accuracy and using one of the Position constants

    Indeed I was. Lol. I thought it was throwing when trying to read info.locationUpdateTimestamp but it was throwing when trying to read...a public constant, Position.QUALITY_*. Easy fix...compare to int.

    Cheers.