So I see that the GPS based ActivityInfo fields, need LocationEvents enabled in order for them to work.
What I don't understand is the use of the method function listener field use in the enable line
function onStart(state) { Position.enableLocationEvents(Position.LOCATION_CONTINUOUS, method(:Position)); } // function Position(info) { // var gps = Position.getInfo(); // }
For example,
Inside my app, I'm not using that function or that gps variable anywhere,I'm just asking getActivityInfo, and it seems to be giving it to me
This seems to be a side effect of enabliing the sensor, rather than the right use of the listner method?
I'm using this function in my app
function compute(info)
so wouldn't it make sense to put function compute as the listener?