If you are planning on Android Wear Development, chances are that you probably do not have an Android Wear device and wish to setup a Wear Emulator.
So, the scenario is something like this:
- You want to get started with Android Wear Development
- You have the Development Tools (Eclipse or Android Studio) and the necessary SDKs in place via the SDK Download Manager
- You have an Android Phone Device
- You do not have an Android Wear Device and wish to use the Emulator for that
Note: If you have never heard about the Android Wear Preview application, just ignore this paragraph. For the rest of us early adopters, who had installed the Android Wear Preview App prior to the release of the Android Wear App, chances are that you might get confused on what is to be done. Let’s get this one out of the way first. Just go ahead and uninstall the Android Wear Preview App, if you still have it on the device. It is not needed.
Google has pretty much nailed the process in their Android Developer Docs over here. So follow the steps for Set up an Android Wear Virtual Device.
The Not So Good
The step that is likely to trip up most people (and I got tripped for a moment too!) is Step 6 – Point 4 that says “Start the Android Wear app on your handheld device and connect to the emulator.”
It may not be obvious where this is hidden, so let me point that out for you. Before we get there, I am assuming that:
- You have connected your Android Phone Device and also started up the Android Wear Emulator.
- Both the devices are seen when you do a adb devices
- You have executed the following command : adb -d forward tcp:5601 tcp:5601
Now, launch the Android Wear App on your phone. If you have been playing around with the Android Wear App and connected an actual Wear App device to it, then it will be confusing on where the option is to connect to the Emulator.
Click on the menu option and choose the Pair with a new wearable option as given below:
This brings up the screen as shown below. You will see that I had connected to an actual Wear Device : Samsung Gear but it is still not clear – where the setting for the Emulator is.
Just click on the Settings icon on the top:
This will show an option to Pair with emulator. Tap on that and you will be all set as shown below:
To validate the process, simply go for the Demo Cards in the Android Wear app and they should appear on your Wear Emulator screen.