OpenVu is my first Android app for Wear devices. I first started by trying to create great watch faces that showed the time in unusual and cool ways. My first attempt was OpenVu One:

OpenVu One

In OpenVu One the outer ring ticks every second, completing the circle each minute. Also the minutes label (38) is positioned closer to the hour label and it’s bigger and has another color than the other minutes labels.

After this, I tried different approaches, creating OpenVu Two.

OpenVu Two

The seconds label (53) circles around the watch, creating a fluid and beautiful motion.

From there, I realised that not every motion had to be circular, so I tried a more abstract approach. This is how OpenVu Three was born:

OpenVu Three

The vertical line swipes the screen each second that passes. The Horizontal line also swipes the screen each minute.

What now?

From there I realised I had created my first watch face for my Android device.

But… I figured that maybe not everyone likes the color scheme I had used… There has to be a way to select a color and tell the watch face which ones to use.

The problem was how the hell can I send data from my smartphone to my watch?

A little research showed that Wearable.MessageApi and Wearable.DataApi where the obvious candidates. After a couple of tutorials I was able to send the color scheme to my watch successfully.

Picking the color scheme

Not Another MessageApi code line! :(

After this project, I realised that I could create any watch face I wanted. So… why not a Pokemon watch face? Long story short and after a lot of trouble with the different screen layouts (square and round) I ended up with this:

OpenVu Pokemon RPG: battle screen

The time is displayed in the upper left corner, the date is displayed in the middle and the watch’s battery life is displayed at the bottom left corner. Every minute both pokemons change randomly.

Also, if you double tap the screen, a mini fight game starts so each minute you can fight a different fight! Every next tap one of the pokemon attacks.

The next logical step was to send data to it right? Basically I copy & paste the same logic from the other watch faces to send different Pokemons to the watch.

After a long time and a lot of boilerplate code, I figured why there’s no library to easily send data from/to devices? So I created Kyky, a really straightforward way to send chunk of information across devices. Basically with just a couple of lines you can send data:

kyky = new Kyky(MainActivity.this, "MY PATH");
//it has many different data types to send
DataMap config = Kyky.DataMapBuilder.create()
.addBoolean("my_boolean", false)
.addString("my_string", "hello world")
.addInt("my_int", 1)

and receive it:

kyky.setExternalDataListener(new DataApi.DataListener() {
public void onDataChanged(DataEventBuffer dataEvents) {
for (DataEvent event : FreezableUtils.freezeIterable(dataEvents)) {
if (event.getType() == DataEvent.TYPE_CHANGED) {
Log.d(TAG, "DataItem changed: " + event.getDataItem().getUri());

DataItem item = event.getDataItem();
if (item.getUri().getPath().equals("MY PATH")) {
DataMap dataMap = DataMapItem.fromDataItem(item).getDataMap();
if (dataMap.containsKey("my_string")) {
//do anything with this string. dataMap.getString("my_string"), "");
//and so on with other data on dataMap                    

very easily.

So if you like to know more about Kyky, go ahead to the Github repo to see the many features it has.

I hope you liked this post and if you have any doubt, don’t hesitate on contact me.

In my next post, I will go in more detail on my Pokemon watch face and it’s RPG mode, where you can fight and capture each pokemon. If you want to be the first to know when it’s ready, please follow me and you will be notified.