Android Wear Getting Started Tutorial

Android wear is a platform by Google for wearable devices. It was launched yesterday. For now it is for watches and later it may expand to other wearable like shoes, pen, etc. The Youtube video showcasing the features of Android Wear by Google is mind blowing.

It is game over for all other smart watches out there. The End. Android wear is simply amazing. Pebble, Samsung and Sony were the early entrants in the smart watch world. They are all going to be in serious trouble. Android wear is not a separate operating system by itself, it is extended from Android which makes it invincible. I am really excited because it opens up innumerable possibilities for innovation.

Android-Wear

The best thing is, Google has opened up the platform immediately with a developer preview. We got an emulator for Android Wear in the SDK update. In this tutorial, I am will walk you through to setup the development environment to start programming for Android Wear. We will also see how cool the notifications are in the Android Wear emulator.

Android Wear was launched just yesterday and I have spent only one night with it yet :-) if you notice any errors in this tutorial, please post a comment to fix it.

Ads by Google

Android Wear Developer Preview

For now the Android Wear platform is targeted for Watches. App will be running in a watch on Android Wear platform and it will be connected to an Android device. It is so exciting since, Android Wear is not just a notification app acting as an extension of the paired device. We can apply actions to it, communicate back to the device! By registering for the Android Wear developer preview we get the following,

  • An Android emulator to run the Android Wear platform.
  • We can connection our Android device to that Android Wear emulator and see the notifications in it and act on it.
  • We get a support library with preview API using which we can enhance our Android apps to be compatible for Android Wear.

Steps to Start with Android Wear

  1. Signup for Developer Preview with Google. Once you signup Google will take some time to approve the request. After approval you will get a link to the ‘Android Wear Preview’ app from Google Play store. Android-Wear-Preview
  2. To setup the Android Wear emulator install the latest Android API and updates (API 19 required) lineup in the Android SDK Manager. Remember to install the ‘Android Wear ARM EABI v7a System Image’. Android-Wear-SDK-Update
  3. Then create Android Virtual Device (AVD) for Wear using the system image just updated. There are two skins available for the Android watch round and square. I have chose square watch. Android-Wear-AVD
  4. Once the Wear AVD is created, launch that and keep it ready. Wear display will show a clock and a disconnected mobile icon to indicate that this wear is not paired with an Android device. If everything is right, you should get the following image. Android-Wear-First-Look
  5. Lets connect our Android device to the computer via USB. In my case, I am using Google Nexus 4 mobile. You need a device with Android 4.3 or above. As per Google, we cannot do this device part with an emulator and we need a real Android device. After connecting the mobile with the computer, to pair the mobile with wear AVD, run the following command in command prompt at Android SDK directory/platform-tools.

    adb -d forward tcp:5601 tcp:5601

    Pair-Device-with-Android-Wear If you get “error: device not found”, then the Android device (mobile) is not properly setup with the computer for debug and its not visible for ADB. You may have to enable the USB debugging mode in developer options, install the right USB device driver.

  6. Install Android Wear Preview app from Google Play store. Link to this will be enabled after you are an approved developer for Android Wear. Open that app and it should say connected. Android-Wear-Dev-Preiview 

Android Wear Notifications

Once the Android device and the Android Wear AVD is paired up, all the notifications received in the Android device are shown automagically in the Wear AVD. Following are some of the cool screenshots from the Android Wear Watch.

Android Wear SMS Notification with Open Action

Android-Wear-SMS-NotificationAndroid-Wear-SMS-Notification-Open

Android Wear Missed Call Notification with Actions

Android-Wear-Missed-Call-NotificationWear-Action---Call-back

Wear-Action-MessageWear-Action-Open

Android Wear GMail Notification with Actions

Android-Wear-Gmail-NotificationAndroid-Wear-Gmail-Notification---Message-Preview

Android-Wear-Gmail-Notification---Archive-ActionAndroid-Wear-Gmail-Notification-Reply-Action

Wear-Action-Open

Android developer preview has given a set of examples to achieve above in Android Wear platform. I will write about those examples in the next tutorial and subsequently write tutorials about how to Android Wear enable our own applications.

This Android tutorial was added on 20/03/2014.

previous post: Draw Path on Google Maps Android API

next post: Android Device to Device Messaging using Google Cloud Messaging (GCM) via Http

30 comments on “Android Wear Getting Started Tutorial

  1. Nice information to start work with android wearable devices. Thank you.

  2. Hey Joe,

    Just today I read an article on Android wear in tech news and now I found a tutorial for it. Awesome…. you rock!!

  3. thanx sir i m try to make multiple notification app,will you please show the code of all app that you already done

  4. sir another question can i connect the two emulator for working on this
    already found a link but thats for ubantu not for window if u found pls give me

    • Emulator for Android Wear platform is fine but as stated by Google / Developer preview the app that will communicate with Wear is not compatible for emulator. This is as of the moment but very soon they will release apis for that too.

  5. Super! Nice to see the quick article to kick start on Android Wear. For sure, Google is driving innovation in web and hand held devices. Now it is wearable devices. Wondering Google may extend the scope of Androidification of the devices… For sure Android is going to be major player in IoT(Internet of Things). Future is going to be exciting!

    • Man you have exactly reflected my thoughts. We love Google.

  6. Thanks mate! Your steps are very clear and I am able to complete the installation in very first time!Great Details

    • Wow great, this is what I want and makes me ecstatic. Enjoy.

  7. Hello,
    I am not able to connect Android Wear Emulator with my device.I have HTC One device which has 4.4 (KitKat OS).

    But, when I execute the line adb -d forward tcp:5601 tcp:5601 through command prompt,nothing happens.Android Wear emulator does not show device connected.

    Note : I am able to launch the Android Wear Preview app successfully in my device and Notifications settings is also enabled.

    My question is do we need to use same value “5601″ ?

    Any help will be appreciated.

    • I had the same problem, i had to fiddle around with the USB settings and use different USB ports… for some reason i also had to update my htc sync software… (just try everything a couple of times;))

      When your device is able to connect to your pc, it should be able to connect your TCP port

    • begin the adb command with a ./

      so on your command line under Android SDK /Platform-tools: ./adb -d forward tcp:5601 tcp:5601

      hope that helps :)

  8. Also, where is the application “Android Wear Preview” in PLayStore? Can you post the link.

  9. Nice article! Really love to see more of android wear. Will be watching out for your articles! (still not sure how/if i can make apps on a android wear device… (i mean not only push notifications from a android app to the wear device)

  10. Wow. Nice insight into the future. Thanks.

  11. Great tutorial buddy Thanks A lot….

  12. is it possible to read the data of the sensors in the watch from the mobile ?

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>