Sensor Permission Erroneously Available for Watch Face?

Former Member
Former Member
ConnectIQ SDK : 1.2.3
Eclipse : Mars.1 Release (4.5.1)

I am under the impression that this is not allowed due to battery conservation efforts (see attached image).

I got all excited that I could add altitude data to my watch face but when I try to implement the class Toybox.Sensor as such (having added the appropriate permission to my manifest):

using Toybox.Sensor as Sens;

class MyWatchFace extends Ui.WatchFace {

function onUpdate(dc) {

snsr = Sens.getInfo();
alt = snsr.altitude;
.
.
.
}
}

The compiler throws a 'Permission Required / Failed invoking <symbol>' error which is to be expected, I guess. If this is not allowed then why is the option available?

  • That was fixed in SDK 1.2.3:

    "General Changes:
    Prevent sensor permissions from being selectable for watch-faces in Eclipse."

    from https://forums.garmin.com/showthread.php?341675-Connect-IQ-1-2-3-SDK-Available!&p=794435#post794435

    Are you sure you're not still running 1.2.2? It's grayed out for me on 1.2.3.

    If you checked it with 1.2.2, there might not be a way to remove it in 1.2.3, so you may have to edit the manifest file directly to remove it.
  • Former Member
    Former Member over 9 years ago
    Hi Jim -

    From Eclipse->Help->Installation Details:

  • This permission is defined in your current SDK tree in the "bin\projectInfo.xml" Here's what's in mine for 1.2.3 for watchfaces"

    <permissionMap appType="watchface">
    <permissions>
    <permission id="Steps" />
    <permission id="UserProfile" />
    </permissions>
    </permissionMap>


    Version 1.2.2 also had sensors....
    <permissionMap appType="watchface">
    <permissions>
    <permission id="Sensor" />
    <permission id="Steps" />
    <permission id="UserProfile" />
    </permissions>
    </permissionMap>


    In Eclipse, in the window menu, preferences, Connect IQ, what is the path you have for the SDK? The picture you posted are for the plug-ins, but not the SDK itself. For that you can download the SDK, or use the "SDK manager" in the "Connect IQ" menu.