SlideShare a Scribd company logo
Android Wear Code Lab
Setup and Run Sample App
05-29-2014
+GerardCordero
OptimizedPrime.com
@GerardCordero
Requirements
You need to complete the pre-lab preparation:
http://www.slideshare.
net/optimizedprime/android-wear-code-lab-
preparation
Setup Android Wear
Virtual Device
15 minutes
Android Virtual Device Manager
● Run Eclipse
● Window > Android Virtual Device
Manager
New Virtual Device
● Click New
Setup the Wearable Virtual Device
Square Device Round Device
Start your Virtual Device
● Select your wearable device
● Click Start
Launch Options
● Click Launch
Booting Up
Installing the Android
Wear Preview App
Installed on your Android 4.3+ Phone
10 minutes
Opt-In to test Android Wear Preview
app
On the email you got back during the pre-
requisites, click “Opt-in to become a tester”
Become a Tester
Click on Become a Tester
Initiate Download
Click “Download it from the Play Store”
Pick a Phone to Install Preview App
The phone you choose will be what you will use
in the code lab. Click Install
Done
Click OK
Setup Sample App
Recipe Assistant
15 minutes
Import into Eclipse
● Run Eclipse
● File > Import
● Android > Existing Android Code Into
Workspace
● Click Next
Open Recipe Assistant
● Click Browse
● Go to your extracted AndroidWearPreview
folder > samples > Recipe Assistant
● Click Open
Rename and Finish
● Click on
MainActivity,
and rename it
to Recipe
Assistant
● Select “Copy
projects into
workspace”
● Click Finish
Delete mipmap-xxxhdpi Folder
● Go to the res folder
● Delete the mipmap-xxxhdpi folder (right-click
> Delete in Eclipse)
● This causes problems, and is safe to delete
Create and Populate libs Folder
● On your Project’s Root Folder, create a libs
folder
● Copy android-support-v4.jar to libs folder (jar
file is in Android ADT folder > sdk > extras >
android > support > v4)
● Copy wearable-preview-support.jar to libs
folder (in extracted AndroidWearPreview)
Add Jar Files to Build
● In Eclipse, right-click > Refresh the Project
● Open libs
● For each jar file, right-click > Build Path >
Add to Build Path
● Entries will show up on Referenced Libraries
Move Contents of java to src folder
● Open Finder or Windows Explorer
● Go to your Recipe Assistant project folder
● Move the contents of the “java” folder into
the “src” folder
● This project is originally an Android Studio
project, but Eclipse goes to the src folder for
classes. This step fixes the Class not found
error
● In Eclipse, right-click the Project > Refresh
Download the Finished Code
● For your convenience, here’s the code:
https://github.
com/GerardCordero/AndroidWear/tree/master/
RecipeAssistant
Setup your Phone
Enable phone to talk to Android Wear
emulated device
15 minutes
Boot up your Android Wear virtual
device
If you haven’t done so, boot it up now
Turn on USB Debugging on Phone
● On your phone, go to Settings > Developer
Options
● Make sure Developer Options is turned on
● Make sure USB Debugging is turned on
● Note: Developer Options location may vary
by phone
Getting your ADB’s Path
● Note: this is for the next two steps
● Go to Android SDK Manager
● Get SDK Path’s value, that is your base
folder
● In Finder/Windows Explorer, go to that path
● then go platform-tools
Plug in your Phone to Computer
● Unlock your phone
● Plug it to your computer via USB cable
● Confirm it’s running by running this
command (from command-line):
○ ./adb devices
● You should see two entries (one for
wearable, one for your phone). Both should
have “device” on it
Run adb forward
● While in the command-line, run this:
○ ./adb -d forward tcp:5601 tcp:5601
● You will see a “g” at the top-right corner of
your wearable virtual device
Confirm on your Android Wear
Preview App
● On your Phone, open the Android Wear
Preview app
● It should say “Connected”
Run Recipe Assistant
10 Minutes
Run as Android Application
● From Eclipse, right-click on the Project >
Run As > Recipe Assistant
● On the list, pick your phone
● Click OK
Send a Recipe to your Wearable
● From your phone’s Recipe Assistant, pick a
Recipe
● Click Start on the Action bar (top-right)

More Related Content

PDF
Android Development Tools and Installation
PPT
Editing an app cloud 9
PPT
Android SDK and PhoneGap
PPT
Android tutorial
PPT
Getting Started with Android
PPTX
How to create android applications
TXT
Sdk readme
PDF
Modifying Android Apps Without Source Code with Microsoft Visual Studio Code
Android Development Tools and Installation
Editing an app cloud 9
Android SDK and PhoneGap
Android tutorial
Getting Started with Android
How to create android applications
Sdk readme
Modifying Android Apps Without Source Code with Microsoft Visual Studio Code

What's hot (20)

PPTX
Methods to set up android app development environment
ODP
techSocAndroid1
PDF
How to edit in Capcut?
PPTX
Build Your First Android App
PPT
Windows Phone Mango and PhoneGap
PPT
Ayw app inventor
PPT
Android Installation Testing
PDF
Startup weekend bootcamp - Android up and running
PPTX
HTC Bluetooth Low Energy Heart Rate Monitor Sample Code
PPTX
Modern web app with REACT
DOCX
AppiumSetupConfigurationonWindows
PPT
Synapseindia android apps with app inventor
PPTX
Week 1 - Android Study Jams
PDF
Mobile App Testing ScanAgile 2012
PDF
Annotation processing
PPTX
TAP Collaborations with JUJU
PDF
Manipulating Android tasks and back stack
DOCX
Installing android sdk on net beans
PDF
The Ring programming language version 1.10 book - Part 5 of 212
PPTX
Developing Android Apps
Methods to set up android app development environment
techSocAndroid1
How to edit in Capcut?
Build Your First Android App
Windows Phone Mango and PhoneGap
Ayw app inventor
Android Installation Testing
Startup weekend bootcamp - Android up and running
HTC Bluetooth Low Energy Heart Rate Monitor Sample Code
Modern web app with REACT
AppiumSetupConfigurationonWindows
Synapseindia android apps with app inventor
Week 1 - Android Study Jams
Mobile App Testing ScanAgile 2012
Annotation processing
TAP Collaborations with JUJU
Manipulating Android tasks and back stack
Installing android sdk on net beans
The Ring programming language version 1.10 book - Part 5 of 212
Developing Android Apps
Ad

Viewers also liked (20)

PDF
Mymobileinnovations games brochure
PPT
Theft in Schools
PPTX
ClassificationAndGenre
PDF
Business article
PDF
Google IO 2015 Highlights
PPTX
Presentation1
PPTX
Acronet @ OpenWater2013
PDF
Julio ballen ingles
PPTX
Horror - film history.
PPTX
Storyboard ---the-truth
PPTX
время денег вебинар центра м арт 2013
ODP
Evaluation Question 1
PDF
Iam sam profile bkletx
PPTX
Representation and stereotypes
PPTX
Electronic portfolio
PDF
San Antonio Marriott Northwest
PPTX
Adam Levine
PPTX
Finding translation resources 3260
PPTX
Best Work so far. - Story-telling Photography.
Mymobileinnovations games brochure
Theft in Schools
ClassificationAndGenre
Business article
Google IO 2015 Highlights
Presentation1
Acronet @ OpenWater2013
Julio ballen ingles
Horror - film history.
Storyboard ---the-truth
время денег вебинар центра м арт 2013
Evaluation Question 1
Iam sam profile bkletx
Representation and stereotypes
Electronic portfolio
San Antonio Marriott Northwest
Adam Levine
Finding translation resources 3260
Best Work so far. - Story-telling Photography.
Ad

Similar to Android Wear Code Lab (20)

PDF
Getting Started with Android Studio: A Step-by-Step Guide
PPTX
Your first Android App
PPTX
FirstProgramInServleJavaProgramHELLO.pptx
PPTX
PPTX
Android software development – the first few hours
PDF
Android installation
PPTX
Day2GDSC.pptx
PPTX
01.1 Your first Android app_Mobile1.pptx
PDF
Discover Android Wear
PDF
Android Wear Code Lab - Preparation
PDF
Bai thuc hanh lap trinh Android so 1
PPTX
Android
PPTX
Android App development I
PDF
Emergency androidstudiochapter
PPT
Android Application Development Environment Setup
PPTX
AndEngine
PDF
Mobile application and Game development
PDF
Appium- part 1
PPTX
Introduction To Android For Beginners.
PPTX
Android Wearable App Development - 1
Getting Started with Android Studio: A Step-by-Step Guide
Your first Android App
FirstProgramInServleJavaProgramHELLO.pptx
Android software development – the first few hours
Android installation
Day2GDSC.pptx
01.1 Your first Android app_Mobile1.pptx
Discover Android Wear
Android Wear Code Lab - Preparation
Bai thuc hanh lap trinh Android so 1
Android
Android App development I
Emergency androidstudiochapter
Android Application Development Environment Setup
AndEngine
Mobile application and Game development
Appium- part 1
Introduction To Android For Beginners.
Android Wearable App Development - 1

Recently uploaded (6)

PDF
Lesson 13- HEREDITY _ pedSAWEREGFVCXZDSASEWFigree.pdf
PDF
6-UseCfgfhgfhgfhgfhgfhfhhaseActivity.pdf
PPTX
ASMS Telecommunication company Profile
DOC
Camb毕业证学历认证,格罗斯泰斯特主教大学毕业证仿冒文凭毕业证
PDF
heheheueueyeyeyegehehehhehshMedia-Literacy.pdf
DOC
证书学历UoA毕业证,澳大利亚中汇学院毕业证国外大学毕业证
Lesson 13- HEREDITY _ pedSAWEREGFVCXZDSASEWFigree.pdf
6-UseCfgfhgfhgfhgfhgfhfhhaseActivity.pdf
ASMS Telecommunication company Profile
Camb毕业证学历认证,格罗斯泰斯特主教大学毕业证仿冒文凭毕业证
heheheueueyeyeyegehehehhehshMedia-Literacy.pdf
证书学历UoA毕业证,澳大利亚中汇学院毕业证国外大学毕业证

Android Wear Code Lab

  • 1. Android Wear Code Lab Setup and Run Sample App 05-29-2014
  • 3. Requirements You need to complete the pre-lab preparation: http://www.slideshare. net/optimizedprime/android-wear-code-lab- preparation
  • 4. Setup Android Wear Virtual Device 15 minutes
  • 5. Android Virtual Device Manager ● Run Eclipse ● Window > Android Virtual Device Manager
  • 7. Setup the Wearable Virtual Device Square Device Round Device
  • 8. Start your Virtual Device ● Select your wearable device ● Click Start
  • 11. Installing the Android Wear Preview App Installed on your Android 4.3+ Phone 10 minutes
  • 12. Opt-In to test Android Wear Preview app On the email you got back during the pre- requisites, click “Opt-in to become a tester”
  • 13. Become a Tester Click on Become a Tester
  • 14. Initiate Download Click “Download it from the Play Store”
  • 15. Pick a Phone to Install Preview App The phone you choose will be what you will use in the code lab. Click Install
  • 17. Setup Sample App Recipe Assistant 15 minutes
  • 18. Import into Eclipse ● Run Eclipse ● File > Import ● Android > Existing Android Code Into Workspace ● Click Next
  • 19. Open Recipe Assistant ● Click Browse ● Go to your extracted AndroidWearPreview folder > samples > Recipe Assistant ● Click Open
  • 20. Rename and Finish ● Click on MainActivity, and rename it to Recipe Assistant ● Select “Copy projects into workspace” ● Click Finish
  • 21. Delete mipmap-xxxhdpi Folder ● Go to the res folder ● Delete the mipmap-xxxhdpi folder (right-click > Delete in Eclipse) ● This causes problems, and is safe to delete
  • 22. Create and Populate libs Folder ● On your Project’s Root Folder, create a libs folder ● Copy android-support-v4.jar to libs folder (jar file is in Android ADT folder > sdk > extras > android > support > v4) ● Copy wearable-preview-support.jar to libs folder (in extracted AndroidWearPreview)
  • 23. Add Jar Files to Build ● In Eclipse, right-click > Refresh the Project ● Open libs ● For each jar file, right-click > Build Path > Add to Build Path ● Entries will show up on Referenced Libraries
  • 24. Move Contents of java to src folder ● Open Finder or Windows Explorer ● Go to your Recipe Assistant project folder ● Move the contents of the “java” folder into the “src” folder ● This project is originally an Android Studio project, but Eclipse goes to the src folder for classes. This step fixes the Class not found error ● In Eclipse, right-click the Project > Refresh
  • 25. Download the Finished Code ● For your convenience, here’s the code: https://github. com/GerardCordero/AndroidWear/tree/master/ RecipeAssistant
  • 26. Setup your Phone Enable phone to talk to Android Wear emulated device 15 minutes
  • 27. Boot up your Android Wear virtual device If you haven’t done so, boot it up now
  • 28. Turn on USB Debugging on Phone ● On your phone, go to Settings > Developer Options ● Make sure Developer Options is turned on ● Make sure USB Debugging is turned on ● Note: Developer Options location may vary by phone
  • 29. Getting your ADB’s Path ● Note: this is for the next two steps ● Go to Android SDK Manager ● Get SDK Path’s value, that is your base folder ● In Finder/Windows Explorer, go to that path ● then go platform-tools
  • 30. Plug in your Phone to Computer ● Unlock your phone ● Plug it to your computer via USB cable ● Confirm it’s running by running this command (from command-line): ○ ./adb devices ● You should see two entries (one for wearable, one for your phone). Both should have “device” on it
  • 31. Run adb forward ● While in the command-line, run this: ○ ./adb -d forward tcp:5601 tcp:5601 ● You will see a “g” at the top-right corner of your wearable virtual device
  • 32. Confirm on your Android Wear Preview App ● On your Phone, open the Android Wear Preview app ● It should say “Connected”
  • 34. Run as Android Application ● From Eclipse, right-click on the Project > Run As > Recipe Assistant ● On the list, pick your phone ● Click OK
  • 35. Send a Recipe to your Wearable ● From your phone’s Recipe Assistant, pick a Recipe ● Click Start on the Action bar (top-right)