Search code examples
indicatorpebble-watchbatterylevelcloudpebble

Pebble Watchface Battery Indicator


I'd would like to add a battery indicator to my Pebble watch face that will indicate the battery-level of my Pebble watch.

I know that I could get it right if I used the documentation found here: http://developer.getpebble.com/docs/c/Foundation/Event_Service/BatteryStateService/
which provides a bunch of way for determining the battery state and Icould just link different states with different images that I make.

But my questions are:

  1. Is there an easier way of implementing a small battery state icon on my watch face without me having to create my own battery state images.
  2. If there isn't an easier way of implementing it, are there any small battery state icons available out there to use instead of making my own images.

I'm basically looking for the best way to implement this so that I don't have to waste time and energy reinventing the wheel.


Solution

  • You can use some code to draw a rectangle inside an "empty" battery icon. This way you have just one icon and you "fill" it depending on the battery status.