Consider the following data field example. Unfortunately, the Position module is not available unless the "Position" permission is granted to the application... but that is not possible for data fields.
So... please move all constants to somewhere accessible, while we can still live with this sort of changes (of cause, you could just dup them somewhere... :-))
using Toybox.WatchUi as Ui;
using Toybox.System as Sys;
using Toybox.Position as Pos;
class TestActivityInfoView extends Ui.SimpleDataField {
function initialize() {
label = "Location";
}
function compute(info) {
if (info.startLocation == null) return "--";
return info.startLocation.toGeoString(Pos.GEO_DEG);
}
}