Drawing a drawable

Former Member
Former Member
For my watch face, I have a file, BlueTooth.xml in the resources/drawables folder of my project. It contains the following:

<drawables>
<bitmap id="icon" x="25" y="125" filename="../../bitmaps/bt.png" />
</drawables>


I have tried many ways to load and draw this icon, and I've not found anything that works. The code I think should load and draw it is:

var bticn = Rez.BlueTooth.icon();
bticn.draw( dc );


I've also tried:

var bticn = Rez.Drawables.icon();
bticn.draw( dc );


I get various runtime errors about expecting a Method but an Object being given, etc.

Can anyone suggest the proper way to load and display a bitmap at runtime, conditionally? I have no problem getting it to draw as part of a layout, but I really need to determine at runtime whether to display it.

Thanks for any and all suggestions.
Ron
  • Former Member
    Former Member over 9 years ago
    Ok, so I decided to troll through the watch settings, specifically to make sure my firmware was latest (3.20). I jumped into the BT settings, and noted two settings, one Smart Notifications, which I have turned off, and another Connection Alert, which I also have turned off.

    I turned them both on and then the icon on my watch face displayed. I don't like having Smart Notifications turned on, so I turned it off, leaving Connection Alert on, and the icon disappeared.

    So it would seem that phoneConnected will never be true if Smart Notifications is turned off. This *kinda* makes sense, but I assumed phoneConnected was a general status indicating the watch had a BLE connection.

    Cheers,
    Ron
  • Ok, so I decided to troll through the watch settings, specifically to make sure my firmware was latest (3.20). I jumped into the BT settings, and noted two settings, one Smart Notifications, which I have turned off, and another Connection Alert, which I also have turned off.

    I turned them both on and then the icon on my watch face displayed. I don't like having Smart Notifications turned on, so I turned it off, leaving Connection Alert on, and the icon disappeared.

    So it would seem that phoneConnected will never be true if Smart Notifications is turned off. This *kinda* makes sense, but I assumed phoneConnected was a general status indicating the watch had a BLE connection.

    Cheers,
    Ron

    IIHO, the status of the "smart notifications" should make no difference for phoneConnected. I'll give it a try on the 230 and see if it's the same. And that seems to be the case...
  • Ok, so I decided to troll through the watch settings, specifically to make sure my firmware was latest (3.20). I jumped into the BT settings, and noted two settings, one Smart Notifications, which I have turned off, and another Connection Alert, which I also have turned off.

    I turned them both on and then the icon on my watch face displayed. I don't like having Smart Notifications turned on, so I turned it off, leaving Connection Alert on, and the icon disappeared.

    So it would seem that phoneConnected will never be true if Smart Notifications is turned off. This *kinda* makes sense, but I assumed phoneConnected was a general status indicating the watch had a BLE connection.

    Cheers,
    Ron


    Well done for figuring it out!
  • Reproduced it on my 230, and reported it to Garmin.

    You may try keeping smart notifications "on" on your watch, but then turning the specific ones off within Garmin Connect Mobile.