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

What's hot

Methods to set up android app development environment
Methods to set up android app development environmentMethods to set up android app development environment
Methods to set up android app development environment
astoria0128
 
techSocAndroid1
techSocAndroid1techSocAndroid1
techSocAndroid1
Vladyslav Kolesnyk
 
How to edit in Capcut?
How to edit in Capcut?How to edit in Capcut?
How to edit in Capcut?
AngelaBonife
 
Build Your First Android App
Build Your First Android AppBuild Your First Android App
Build Your First Android App
Transpose Solutions Inc
 
Windows Phone Mango and PhoneGap
Windows Phone Mango and PhoneGapWindows Phone Mango and PhoneGap
Windows Phone Mango and PhoneGap
Doncho Minkov
 
Ayw app inventor
Ayw app inventorAyw app inventor
Ayw app inventor
pbeerak
 
Android Installation Testing
Android Installation TestingAndroid Installation Testing
Android Installation Testing
Sourabh Sahu
 
Startup weekend bootcamp - Android up and running
Startup weekend bootcamp - Android up and runningStartup weekend bootcamp - Android up and running
Startup weekend bootcamp - Android up and running
Lance Nanek
 
HTC Bluetooth Low Energy Heart Rate Monitor Sample Code
HTC Bluetooth Low Energy Heart Rate Monitor Sample CodeHTC Bluetooth Low Energy Heart Rate Monitor Sample Code
HTC Bluetooth Low Energy Heart Rate Monitor Sample Code
Lance Nanek
 
Modern web app with REACT
Modern web app with REACTModern web app with REACT
Modern web app with REACT
AndryRajohnson
 
AppiumSetupConfigurationonWindows
AppiumSetupConfigurationonWindowsAppiumSetupConfigurationonWindows
AppiumSetupConfigurationonWindows
Lalit Ghule
 
Synapseindia android apps with app inventor
Synapseindia android apps with app inventorSynapseindia android apps with app inventor
Synapseindia android apps with app inventor
Synapseindiappsdevelopment
 
Week 1 - Android Study Jams
Week 1 - Android Study JamsWeek 1 - Android Study Jams
Week 1 - Android Study Jams
JoannaCamille2
 
Mobile App Testing ScanAgile 2012
Mobile App Testing ScanAgile 2012Mobile App Testing ScanAgile 2012
Mobile App Testing ScanAgile 2012
Daniel Knott
 
Annotation processing
Annotation processingAnnotation processing
Annotation processing
Felipe Theodoro
 
TAP Collaborations with JUJU
TAP Collaborations with JUJUTAP Collaborations with JUJU
TAP Collaborations with JUJU
hSenid Mobile Marketing
 
Manipulating Android tasks and back stack
Manipulating Android tasks and back stackManipulating Android tasks and back stack
Manipulating Android tasks and back stack
Ran Nachmany
 
Installing android sdk on net beans
Installing android sdk on net beansInstalling android sdk on net beans
Installing android sdk on net beans
Aravindharamanan S
 
The Ring programming language version 1.10 book - Part 5 of 212
The Ring programming language version 1.10 book - Part 5 of 212The Ring programming language version 1.10 book - Part 5 of 212
The Ring programming language version 1.10 book - Part 5 of 212
Mahmoud Samir Fayed
 
Developing Android Apps
Developing Android AppsDeveloping Android Apps
Developing Android Apps
Claire Lee
 

What's hot (20)

Methods to set up android app development environment
Methods to set up android app development environmentMethods to set up android app development environment
Methods to set up android app development environment
 
techSocAndroid1
techSocAndroid1techSocAndroid1
techSocAndroid1
 
How to edit in Capcut?
How to edit in Capcut?How to edit in Capcut?
How to edit in Capcut?
 
Build Your First Android App
Build Your First Android AppBuild Your First Android App
Build Your First Android App
 
Windows Phone Mango and PhoneGap
Windows Phone Mango and PhoneGapWindows Phone Mango and PhoneGap
Windows Phone Mango and PhoneGap
 
Ayw app inventor
Ayw app inventorAyw app inventor
Ayw app inventor
 
Android Installation Testing
Android Installation TestingAndroid Installation Testing
Android Installation Testing
 
Startup weekend bootcamp - Android up and running
Startup weekend bootcamp - Android up and runningStartup weekend bootcamp - Android up and running
Startup weekend bootcamp - Android up and running
 
HTC Bluetooth Low Energy Heart Rate Monitor Sample Code
HTC Bluetooth Low Energy Heart Rate Monitor Sample CodeHTC Bluetooth Low Energy Heart Rate Monitor Sample Code
HTC Bluetooth Low Energy Heart Rate Monitor Sample Code
 
Modern web app with REACT
Modern web app with REACTModern web app with REACT
Modern web app with REACT
 
AppiumSetupConfigurationonWindows
AppiumSetupConfigurationonWindowsAppiumSetupConfigurationonWindows
AppiumSetupConfigurationonWindows
 
Synapseindia android apps with app inventor
Synapseindia android apps with app inventorSynapseindia android apps with app inventor
Synapseindia android apps with app inventor
 
Week 1 - Android Study Jams
Week 1 - Android Study JamsWeek 1 - Android Study Jams
Week 1 - Android Study Jams
 
Mobile App Testing ScanAgile 2012
Mobile App Testing ScanAgile 2012Mobile App Testing ScanAgile 2012
Mobile App Testing ScanAgile 2012
 
Annotation processing
Annotation processingAnnotation processing
Annotation processing
 
TAP Collaborations with JUJU
TAP Collaborations with JUJUTAP Collaborations with JUJU
TAP Collaborations with JUJU
 
Manipulating Android tasks and back stack
Manipulating Android tasks and back stackManipulating Android tasks and back stack
Manipulating Android tasks and back stack
 
Installing android sdk on net beans
Installing android sdk on net beansInstalling android sdk on net beans
Installing android sdk on net beans
 
The Ring programming language version 1.10 book - Part 5 of 212
The Ring programming language version 1.10 book - Part 5 of 212The Ring programming language version 1.10 book - Part 5 of 212
The Ring programming language version 1.10 book - Part 5 of 212
 
Developing Android Apps
Developing Android AppsDeveloping Android Apps
Developing Android Apps
 

Viewers also liked

Mymobileinnovations games brochure
Mymobileinnovations games brochureMymobileinnovations games brochure
Mymobileinnovations games brochure
Susheel Bansilal
 
Theft in Schools
Theft in Schools Theft in Schools
Theft in Schools
Isla Brown
 
ClassificationAndGenre
ClassificationAndGenreClassificationAndGenre
ClassificationAndGenre
ShannWebb
 
Business article
Business articleBusiness article
Business article
bweaver8
 
Gr1 po1
Gr1 po1Gr1 po1
Google IO 2015 Highlights
Google IO 2015 HighlightsGoogle IO 2015 Highlights
Google IO 2015 Highlights
Gerard
 
Presentation1
Presentation1Presentation1
Presentation1
bweaver8
 
Acronet @ OpenWater2013
Acronet @ OpenWater2013Acronet @ OpenWater2013
Acronet @ OpenWater2013
acronetparadigm
 
Julio ballen ingles
Julio ballen inglesJulio ballen ingles
Julio ballen ingles
91362291
 
Horror - film history.
Horror - film history.Horror - film history.
Horror - film history.
ShannWebb
 
Storyboard ---the-truth
Storyboard ---the-truthStoryboard ---the-truth
Storyboard ---the-truth
ShannWebb
 
время денег вебинар центра м арт 2013
время денег вебинар центра м арт 2013время денег вебинар центра м арт 2013
время денег вебинар центра м арт 2013
Maria Fabricheva
 
Evaluation Question 1
Evaluation Question 1Evaluation Question 1
Evaluation Question 1
AimeeBar
 
Iam sam profile bkletx
Iam sam profile bkletxIam sam profile bkletx
Iam sam profile bkletx
Rayla Melchor Santos
 
Representation and stereotypes
Representation and stereotypesRepresentation and stereotypes
Representation and stereotypes
ShannWebb
 
Electronic portfolio
Electronic portfolioElectronic portfolio
Electronic portfolio
ShannWebb
 
San Antonio Marriott Northwest
San Antonio Marriott NorthwestSan Antonio Marriott Northwest
San Antonio Marriott Northwest
TXHotel1
 
Adam Levine
Adam LevineAdam Levine
Adam Levine
CarlotaSorroche
 
Finding translation resources 3260
Finding translation resources 3260Finding translation resources 3260
Finding translation resources 3260
ljackso2
 
Best Work so far. - Story-telling Photography.
Best Work so far. - Story-telling Photography.Best Work so far. - Story-telling Photography.
Best Work so far. - Story-telling Photography.
ShannWebb
 

Viewers also liked (20)

Mymobileinnovations games brochure
Mymobileinnovations games brochureMymobileinnovations games brochure
Mymobileinnovations games brochure
 
Theft in Schools
Theft in Schools Theft in Schools
Theft in Schools
 
ClassificationAndGenre
ClassificationAndGenreClassificationAndGenre
ClassificationAndGenre
 
Business article
Business articleBusiness article
Business article
 
Gr1 po1
Gr1 po1Gr1 po1
Gr1 po1
 
Google IO 2015 Highlights
Google IO 2015 HighlightsGoogle IO 2015 Highlights
Google IO 2015 Highlights
 
Presentation1
Presentation1Presentation1
Presentation1
 
Acronet @ OpenWater2013
Acronet @ OpenWater2013Acronet @ OpenWater2013
Acronet @ OpenWater2013
 
Julio ballen ingles
Julio ballen inglesJulio ballen ingles
Julio ballen ingles
 
Horror - film history.
Horror - film history.Horror - film history.
Horror - film history.
 
Storyboard ---the-truth
Storyboard ---the-truthStoryboard ---the-truth
Storyboard ---the-truth
 
время денег вебинар центра м арт 2013
время денег вебинар центра м арт 2013время денег вебинар центра м арт 2013
время денег вебинар центра м арт 2013
 
Evaluation Question 1
Evaluation Question 1Evaluation Question 1
Evaluation Question 1
 
Iam sam profile bkletx
Iam sam profile bkletxIam sam profile bkletx
Iam sam profile bkletx
 
Representation and stereotypes
Representation and stereotypesRepresentation and stereotypes
Representation and stereotypes
 
Electronic portfolio
Electronic portfolioElectronic portfolio
Electronic portfolio
 
San Antonio Marriott Northwest
San Antonio Marriott NorthwestSan Antonio Marriott Northwest
San Antonio Marriott Northwest
 
Adam Levine
Adam LevineAdam Levine
Adam Levine
 
Finding translation resources 3260
Finding translation resources 3260Finding translation resources 3260
Finding translation resources 3260
 
Best Work so far. - Story-telling Photography.
Best Work so far. - Story-telling Photography.Best Work so far. - Story-telling Photography.
Best Work so far. - Story-telling Photography.
 

Similar to Android Wear Code Lab

Your first Android App
Your first Android AppYour first Android App
Your first Android App
Muhammad Sajid
 
Android app upload
Android app uploadAndroid app upload
Android software development – the first few hours
Android software development – the first few hoursAndroid software development – the first few hours
Android software development – the first few hours
sjmarsh
 
Android installation
Android installationAndroid installation
Android installation
Durai S
 
Day2GDSC.pptx
Day2GDSC.pptxDay2GDSC.pptx
Day2GDSC.pptx
GDSCICOER
 
Discover Android Wear
Discover Android WearDiscover Android Wear
Discover Android Wear
Troy Miles
 
Android Wear Code Lab - Preparation
Android Wear Code Lab - PreparationAndroid Wear Code Lab - Preparation
Android Wear Code Lab - Preparation
Gerard
 
Bai thuc hanh lap trinh Android so 1
Bai thuc hanh lap trinh Android so 1Bai thuc hanh lap trinh Android so 1
Bai thuc hanh lap trinh Android so 1
Frank Pham
 
Android
AndroidAndroid
Android
BVP GTUG
 
Android App development I
Android App development IAndroid App development I
Android App development I
Thenraja Vettivelraj
 
Emergency androidstudiochapter
Emergency androidstudiochapterEmergency androidstudiochapter
Emergency androidstudiochapter
Aravindharamanan S
 
Android Application Development Environment Setup
Android Application Development Environment SetupAndroid Application Development Environment Setup
Android Application Development Environment Setup
Ian Pinto
 
AndEngine
AndEngineAndEngine
AndEngine
TheBeege
 
Mobile application and Game development
Mobile application and Game developmentMobile application and Game development
Mobile application and Game development
Women In Digital
 
Appium- part 1
Appium- part 1Appium- part 1
Appium- part 1
Mithilesh Singh
 
Introduction To Android For Beginners.
Introduction To Android For Beginners.Introduction To Android For Beginners.
Introduction To Android For Beginners.
Sandeep Londhe
 
Android Wearable App Development - 1
Android Wearable App Development - 1Android Wearable App Development - 1
Android Wearable App Development - 1
Ketan Raval
 
Android - Getting started with Android
Android - Getting started with Android Android - Getting started with Android
Android - Getting started with Android
Vibrant Technologies & Computers
 
Android App Development 20150402
Android App Development 20150402Android App Development 20150402
Android App Development 20150402
Hideo Kadowaki
 
Android programming-basics
Android programming-basicsAndroid programming-basics
Android programming-basics
Aravindharamanan S
 

Similar to Android Wear Code Lab (20)

Your first Android App
Your first Android AppYour first Android App
Your first Android App
 
Android app upload
Android app uploadAndroid app upload
Android app upload
 
Android software development – the first few hours
Android software development – the first few hoursAndroid software development – the first few hours
Android software development – the first few hours
 
Android installation
Android installationAndroid installation
Android installation
 
Day2GDSC.pptx
Day2GDSC.pptxDay2GDSC.pptx
Day2GDSC.pptx
 
Discover Android Wear
Discover Android WearDiscover Android Wear
Discover Android Wear
 
Android Wear Code Lab - Preparation
Android Wear Code Lab - PreparationAndroid Wear Code Lab - Preparation
Android Wear Code Lab - Preparation
 
Bai thuc hanh lap trinh Android so 1
Bai thuc hanh lap trinh Android so 1Bai thuc hanh lap trinh Android so 1
Bai thuc hanh lap trinh Android so 1
 
Android
AndroidAndroid
Android
 
Android App development I
Android App development IAndroid App development I
Android App development I
 
Emergency androidstudiochapter
Emergency androidstudiochapterEmergency androidstudiochapter
Emergency androidstudiochapter
 
Android Application Development Environment Setup
Android Application Development Environment SetupAndroid Application Development Environment Setup
Android Application Development Environment Setup
 
AndEngine
AndEngineAndEngine
AndEngine
 
Mobile application and Game development
Mobile application and Game developmentMobile application and Game development
Mobile application and Game development
 
Appium- part 1
Appium- part 1Appium- part 1
Appium- part 1
 
Introduction To Android For Beginners.
Introduction To Android For Beginners.Introduction To Android For Beginners.
Introduction To Android For Beginners.
 
Android Wearable App Development - 1
Android Wearable App Development - 1Android Wearable App Development - 1
Android Wearable App Development - 1
 
Android - Getting started with Android
Android - Getting started with Android Android - Getting started with Android
Android - Getting started with Android
 
Android App Development 20150402
Android App Development 20150402Android App Development 20150402
Android App Development 20150402
 
Android programming-basics
Android programming-basicsAndroid programming-basics
Android programming-basics
 

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)