I'm a newbie trying to make a DataField displaying some GPS information.
But I get some problem with permissions.
If I make a SimpleDataField like this:
using Toybox.WatchUi as Ui;
using Toybox.Position as Position;
class MGRSdataFieldView extends Ui.SimpleDataField {
function initialize() {
label = "MGRS";
}
function compute(info) {
if( info.currentLocation != null )
{
return info.currentLocation.toGeoString(Position.GEO_MGRS);
} else {
return "No Signal";
}
}
}
the Eclipse simulator will display: "MGRS No Signal" as expected.
If I give the simulator the command: Simulation -> Fit Data -> Simulate Data
I get the console error message: "Permission Required"
I tried to modify the project property in Eclipse by ticking for "Positioning" in the "Permissions" box but then I get the error message:
BUILD: ERROR: The following permission is invalid for a Data Field: Positioning
ERROR: Bad manifest file
What is wrong. How can I get permissions to use info.currentLocation in DataField ?
The problem is present for both SimpleDataField and DataField classes.
Thanks for any help!