So where are we with the ability to check the status of Bluetooth connectivity, alarms and notifications for watch faces?
I'd like to add icons for these but not sure if the iq / firmware supports it yet.
Anyone? Ta
Bluetooth status is working on fenix, FR920 and vivoactive with latest firmware. I tested it. But i think that alarms and notifications are not supported in SDK.
var settings = Sys.getDeviceSettings();
// make sure the device firmware is up to snuff
if (settings has :phoneConnected)
{
if (settings.phoneConnected) {
// phone is connected
}
else {
// phone is not connected
}
}
using Toybox.WatchUi as Ui;
using Toybox.Graphics as Gfx;
using Toybox.System as Sys;
using Toybox.Lang as Lang;
class sampleView extends Ui.WatchFace {
var device_settings;
function onLayout(dc) {
device_settings = Sys.getDeviceSettings();
}
function onUpdate(dc) {
View.onUpdate(dc);
var width = dc.getWidth();
var height = dc.getHeight();
if( device_settings.phoneConnected == true)
{
dc.setColor(Gfx.COLOR_LT_GRAY, Gfx.COLOR_TRANSPARENT);
dc.drawText( width/2, height/2, Gfx.FONT_SMALL, "Phone connected" , Gfx.TEXT_JUSTIFY_CENTER);
}
else
{
dc.setColor(Gfx.COLOR_LT_GRAY, Gfx.COLOR_TRANSPARENT);
dc.drawText( width/2, height/2, Gfx.FONT_SMALL, "Phone disconnected" , Gfx.TEXT_JUSTIFY_CENTER);
}
}
}
if(device_settings has :phoneConnected) :)Is there a possibility to check if the watch tries to connect or not?
I'd like to see...
1. no icon if the phone is 'off'
2. a gray icon if the phone is activated but not connected and
3. a blue icon if the connection has been established.
...but phoneConnected allows me only to check if state 3 is given or not.