Basic BodyBattery code example

I'm trying to make a widget or an app that will query BodyBattery. I have this piece of code that compiles, but never enters the `if (ActivityMonitor has :getBodyBatteryHistory)` even though I'm trying it in the simulator on Venu 2 System 5 preview, with targetApiLevel: 4.1.x and minApiLevel: 4.1.0.beta1.

I'm not sure what permissions are needed (Garmin, it would be nice to be able to know it from the documentation...), so I have these in the manifest:

<iq:permissions>
<iq:uses-permission id="Background"/>
<iq:uses-permission id="PersistedContent"/>
<iq:uses-permission id="Sensor"/>
<iq:uses-permission id="SensorHistory"/>
</iq:permissions>

I have this in my view:

    function onUpdate(dc as Dc) as Void {
    	if (ActivityMonitor has :getBodyBatteryHistory) { // this is always false
    		var bbIter = ActivityMonitor.getBodyBatteryHistory();
    		if (bbIter != null) {
    			var bbData = bbIter.next();
    			if (bbData != null) {
    				System.println("BB: " + bbData);
    			}
    		}
    	}
        // Call the parent onUpdate function to redraw the layout
        View.onUpdate(dc);
    }

(Garmin!!!!!!!!!!!!! Why there isn't Monkey C in the code languages????? Why My formatted code is displayed like this in the editor?????)


Any idea what am I doing wrong?