I want to develop an application with eclipse project type "Watch-App".
Basically I'm interested to get the Temperature and Speed without any external sensor. My watch (Fenix 3) should support this actually.
I made a little test application.
- On the simulator I get the temperatur as soon as I enable Simulation->FIT Data->Simulate Data.
- On the real watch (fenix 3), I don't get any temperatur updates with the same code
Code:
//! Constructor
function initialize()
{
Snsr.setEnabledSensors( [Snsr.SENSOR_TEMPERATURE] );
Snsr.enableSensorEvents( method(:onSnsr) );
string_HR = "---temp";
}
function onSnsr(sensor_info)
{
var HR = sensor_info.temperature;
var bucket;
if( sensor_info.temperature != null )
{
string_HR = HR.toString().substring(0, 2) + " temp";
//Add value to graph
HR_graph.addItem(HR);
}
else
{
string_HR = "temp";
}
Ui.requestUpdate();
}
Question: How can I access the internal sensors of the watch?