I've found a spot of time to try out the Android Wear SDK within the confines of the Android Wear Emulator. Hot out of Google, Android Wear offers the users the ability to view Google Now Cards, and interact with applications using a screen on their wrist. The interaction with the device seems to be primarily hardware buttons, touch, and voice - much like Google Glass. Sadly the emulator doesn't currently support interaction via voice.


The currently available Android wear devices vary quite a lot already in terms of hardware features, size and shape. A personal favourite of mine is the Moto 360 by Motorola. It has a crisp design with smooth edges, which fits well with the expectation of how a watch looks. It'll be interesting watching what competition drives out with innovation.

  A key area for me personally is focusing on the battery life. At a bare minimum I'd want a Smart Watch to last for 24 hours, ideally a full week, between charges. A watch is something I used to wear without taking it off, including in the shower. It was something I'd have on and forget about. Nowadays I use my phone to check the time. But there are times - like when it's raining and I'm out walking in it - that I'd like to be able to check the time by glancing at my wrist, without battling with pockets getting all the more wet.


It's quick and easy to get started with the Android Wear SDK. It's a simple download of the SDK as per other android releases. This'll be familiar to those who've used Android Studio and Eclipse. The IDE of choice for Android development here at Conjure is Android Studio. It's been pleasant to watch as it has evolved so far, and we look forward to seeing it shed the beta label and advance into version 1.0.

The Android Studio project template quickly guides you through creating your first Android Wear application. Providing you with the most basic hello world to get you started. I didn't want to go too heavily into interactions between the phone and the Wear device using the emulator without a real Wear device at hand. So I thought I'd see just how similar it is to the Android SDK I've grown used to.

I decided to expand on the "Hello World" a little more while exploring animations and seeing how they can be nice on a smaller screen too. So first and foremost I changed the background colour and changed some text. Straight away I noticed the differences between the square and round layout files. Having to repeat sections of views from Tablet and Phones to make a better experience this wasn't new territory for me. But the shape itself was. I noticed that the strings resources had both round and square versions. This was a handy thing that I generally would not have thought to do this. Generally copy remains the same on both phone and tablet even if the view is adjusted. The usefulness of this is particular tied to the different screen shapes. For example on a square watch you'd have access to the same screen width at whatever Y-coordinate. But on a round device, that could be at the top or bottom and result in your text being cut off. Ill-looking for the user. I decided I wanted to render 'Bringing the magic' along the bottom, that would bounce up from the bottom of the screen. I didn't want to just write a shorter button for the round layout file so I just bought up the height until it fitted. Working with the Android layout renderer was useful to spot and adjust this quickly.

After I'd finished with fading in our Conjure logo and making the text bounce up from the bottom I thought it'd be nice to have a more continuous animation as a part of the background to make the app seem more alive and a feature-piece. So I picked an image that was originally designed for use on a Nexus 7. Coming in at a fair 1920 x 1920. Far too big to fit on a 320(dp) square display without scaling. Though to my surprise on the emulator it rendered fine on a virtual device with 512MB RAM and a VM Heap of size 32MB. Rendering large Bitmaps has proved a troublesome task in the past but it seems to be a problem reduced by the improvement of devices. Despite this surprise I cropped the image to be more suitable.


You can see the app in action in the video below.

The whole thing took around 30 minutes, with around 10 minutes project work and 20 minutes finding and editing the right images. Within 5 minutes I'd run Hello World.


It's simple to create views using separate layout files for each display shape within Android's XML designer. Android wear comes with two screen types: Round, and Square - referred to in code as Rectangular. This proves as an interesting hurdle for design and development of an application. We're used to our screens having 90 degree corners and straight edges. We've grown used to developing applications that scale up and down in screen sizes. Now also a task presented iOS developers with the release of iOS 8.0 and Auto Layout. So sharing how we as Android developers overcome those issues has proven useful. It'll be interesting to see the different kinds of applications companies come up with to make use of Android Wear and wearables in general.

Looking into the future I'm pleased to see that Google announced the possibility of offline music playing via bluetooth and GPS tracking. Meaning you're free to leave your phone at home whilst out for a run, walk or other activities. I'd be interested to see if they could bring offline maps to it too. As per their Android app functionality.

Original post.