06 November 2015
Protirus Pebble Watchface
I bought a Pebble watch so I could delve into the developer aspect and create a couple of watch faces, plus what's not cool about a smartwatch, anyone remember Knight Rider, who wouldn't want to talk to their car, just me?
They have great documentation and an awesome IDE in the cloud - https://cloudpebble.net/
. Try it out, so easy to use and you can create an app very quickly.
They have a number of SDKs, I used the C one, luckily I have some experience when dealing with some low level APIs in iOS developement that aren't Obj-C but C instead.
This is quite a simple watchface but allows for a couple of customisations. There is a custom image as the background, a custom font, showing the date and time on the screen.
Firstly I made an image 144x168 using just the Protirus P.
Then I needed to position both the Time and Date in the bottom right of the screen. This all uses layers with formatting options you'd expect like size, alignment and position.
The key here is not to have too much going on or you'll drain the battery, we only need to update the time every minute, if we did it every second it would get process intensive. This goes for if you wanted to show an animation, your could load multiple images and just switch between them.
You can download the Watchface on the Market
and see the code on github
What's your favourite one, let me know in the comments.