SlideShare a Scribd company logo
[TUTORIAL] How to develop Android Wear apps for
Beginners. Part 1 - Setup
AndroidWear
apps tutorial androidwear dev
calmarj
Jan 16
13
Android Wear is a new version of the Android system designed specifically for wearables , which
was announced by Google in march 2014. Currently lots of devices running on Android Wear were
released, including well designed Moto 360 and Gear Live by Samsung.But still, amount of
applications using all the benefits of Android Wear in Google Play is considerably small.
In this tutorial I'm going to show you how to create apps for Android Wear from Scratch.
Set up the Android development environment
Studying every new technology begins with launching "Hello World" example. But first you need to
set your development environment.
 JDK – development kit for Java programming language
 Android Studio – IDE to make our Android apps
 Android SDK – special development kit for Android development
 Android Virtual Device – emulator to test our apps
JDK
Android applications are usually developed in Java programming language using the Software
Development Kit. That's why we need to download SDK for working with Java.
1) Download the Java SE Development Kit (JDK) from this
site:http://www.oracle.com/technetwork/java/javase/downloads/175
2) Click Download from the JDK section of the 'Java Platform, Standard Edition' table.
3) Install the JDK environment with default setting
You can find more detailed instruction here:
http://www.oracle.com/technetwork/java/javase/index-137561.html24
Android Studio
Google developed its own environment for Android applications with lots of perks for development.
You can download it here: http://developer.android.com/sdk/index.html190
Here are steps for installation Android Studio on Windows and Linux. For MAC they are pretty
similar.
Installation for Windows:
1) Download and run **android-studio-bundle-(your version).exe**, then click on the "Next" button.
2) Leave all default settings untouched and click the **"Next"** button.
3) Agree with all license agreements and click the "Next" button.
Android wear notes
4) Choose a path where to install Android Studio and Android SDK.(**Please note**: use only ASCII
characters - english letters)
5) Android SDK includes Android device emulator. It means you can use emulator when you don't
have Android Wear Watch. I'm going to use emulator in this tutorial. Emulator for Windows requires
installation of the Intel Hardware Accelerated Execution Manager (Intel HAXM).
In this window you can adjust the amount of memory avaliable for HAXM. Leave it recommended
and click the "Next" button.
6) Select or create a folder in which you would like to create the program's shortcut.
7) Now the installation of Android Studio begins. Required time depends on your computer. For me it
took about half an hour. Next click on the «Finish» button.
2q3B44znmHQ.jpg797x606 62.5 KB
Installation for Linux:
Download android-studio-ide-(your-version)-linux.zip. Unzip it (Please note: don't use non ASCII
characters in istallation path). Open terminal, go to Android Studio folder, then go the bin folder
and runstudio.sh script. These steps you can see in the screenshot for my system - Ubuntu 14.10.
qf46TCrt7zY.jpg722x462 35.4 KB
Android SDK
The start window of Android Studio should appear after the installation.(click on created shortcut if
the start window did not appear(for Windows) or run script studio.sh(for Linux)). Android platform
includes systems for phones, tvs and watches, so we need to download special development toolkit
for Android Wear. Click on"Configure" button and turn on SDK Manager.
TEPyZZOW_eI.jpg807x617 51.4 KB
If you want to test your applications on emulator, you also need to download virtual images, (Intel
x86 images will work faster). I recommend you to download samples for SDK, we are going to study
them later. If you want to test your application for different Android Wear versions, you need to
download SDK and virtual image for Android 4.4. Don't change default settings (so USB driver will
be installed. It maintains correct plugging a device into a computer.) Next click on "Install" button and
agree with licence agreement.
H7Ui-u42yjQ.jpg531x807 115 KB
SDK installation can take a while(about couple of hours).
Creating new project
Having downloaded SDK, we move to creating your first Android Wear application. More precisely
we are going to study one of the samples provided by Google.
1. Run Android Studio and Click Option «Import an Android code sample»
l71AnjZ637E.jpg797x606 65.4 KB
2. Type "Wear" in the searching box and choose "Skeleton Wearable App". Then click on
the "Next"button.
r5MLKA-KOOE.jpg807x492 38.4 KB
3. Now you can choose the name and path of your project. (Please note: don't change it unless
there are non ASCII characters) and click "Finish":
ISlD7htljss.jpg807x489 31.2 KB
4. Wait till the project is downloaded and built.
Please notice:
If you can see the error like:
"Failed to import new Gradle project: failed to find Build Tools revision xx.xx.xx "
then you don't have the latest version of the build tool. One of the main benefits of Android
Studio is that it can do menial work. Just click on "Install and sync project".
Your first project is done.
Now we need a watch to test an application. You can use an emulator if you don't have a watch.
Set up an Android Wear Virtual Device(AVD)
1. Click Tools>Android>AVD Manager or click on corresponding button in the panel:
cne4wz9gQVY.jpg807x489 30.2 KB
2. Click Create Virtual Device and after that choose category Wear in List and
select Square or Round Android Wear(you can see that Iselected Round) and click "Next":
1Bf0CYYLM2w.jpg807x492 38 KB
3. Choose Android Wear version(I chose Lollipop for this tutorial, because it's the latest version and
most user-friendly, in my opinion.) and click "Next":
WToOaF9mxUU.jpg807x484 41.4 KB
4. Now you can change name of your AVD (I named it Smartwatch tutorial),choice of screen or
firmware. Also you can turn on Host GPU (better do it, that way the emulator will use computer
video card for rendering).
You can also turn on "Store a snapshot for faster startup". It lets AVD Manager to save
system state on hard disk after you finish working with emulator. It allows you to run the
emulator faster, because any Android emulator runs really slow(except third-party emulators,
like Genomytion)
After you finish setting click on the "Finish" button.
lsqjJs44rGk.jpg807x484 39.7 KB
5. Emulator created successfully.
fr9lLTI-Vck.jpg807x431 25.4 KB
6. Now you can run the emulator, it can take a while. After that you can study how to work with
Android Wear following instructions.
Run the app
We need to set startup configuration to run this app. Click a field left from "Run", there you
can "Edit Configuration" or choose module to run.Choose "Wearable"(because we are going
to run the application for watches) and click on "Run".
Now we can see the list of devices ready for the application to be installed on. Choose the
emulator we created early. (you need to run the emulator first.)
xzjRWgC4Jo8.jpg807x401 34.7 KB
After the application is started click on "Show Notification" button, and application should show
you sample notifications.
You can see that this sample is not adapted for round shape of the watches. You have to avoid
this while developing applications for Android Wear.
Sum up
In this tutorial we set up our system for development applications and ran our first Android Wear
application.
In next tutorial I will show you how to connect your watches(or emulator) with your phone(or
tablet). Please don't hesitate to ask any questions and leave feedback. Thank you for reading.
Building Apps for Wearables
These classes teach you how to build notifications in a handheld app that are
automatically synced to wearables as well as how to build apps that run on wearables.
Note: For more information about the APIs used in these training classes, see the Wear API
reference documentation.
1.
Adding Wearable Features to Notifications
How to build handheld notifications that are synced to and look great on wearables.
1. Creating a Notification
2. Receiving Voice Input in a Notification
3. Adding Pages to a Notification
4. Stacking Notifications
2.
Creating Wearable Apps
How to build apps that run directly on wearables.
1. Creating and Running a Wearable App
2. Creating Custom Layouts
3. Keeping Your App Visible
4. Adding Voice Capabilities
5. Packaging Wearable Apps
6. Debugging over Bluetooth
3.
Creating Custom UIs
How to create custom user interfaces for wearable apps.
1. Defining Layouts
2. Creating Cards
3. Creating Lists
4. Creating a 2D Picker
5. Showing Confirmations
6. Exiting Full-Screen Activities
4.
Sending and Syncing Data
How to sync data between handhelds and wearables.
1. Accessing the Wearable Data Layer
2. Syncing Data Items
3. Transferring Assets
4. Sending and Receiving Messages
5. Handling Data Layer Events
5.
Creating Watch Faces
How to create watch faces for wearables.
1. Designing Watch Faces
2. Building a Watch Face Service
3. Drawing Watch Faces
4. Showing Information in Watch Faces
5. Creating Interactive Watch Faces
6. Providing Configuration Activities
7. Addressing Common Issues
8. Optimizing Performance and Battery Life
6.
Detecting Location
How to detect location data on Android Wear devices.
[TUTORIAL] How to develop Android Wear apps for
Beginners. Part 2 - Connect Android Wear with
handheld device
AndroidWear
androidwear tutorial dev
1
/
4
calmarj
Jan 17
9
In my previous tutorial I told you how to set your development environment for Android Wear, create
and run a project from Google samples, and how to create Android Wear (AVD).
You can read it here:
www.smartwatch.me
[TUTORIAL] How to develop Android Wear apps for Beginners. Part 1 - Setup
Android Wear is a new version of the Android system designed specifically for wearables , which
was announced by Google in march 2014. Currently lots of devices running on Android Wear were
released, including well designed Moto 360 and Gear Live by Samsung.But still, amount of
applications using all the benefits of Android Wear in Google Play is considerably small. In this
tutorial I'm going to show you how to create apps for Android Wear from Scratch. Set up the Android
development en...
You can develop not only Wearable apps with Android Wear SDK, but also you can create apps for
smartphones and tablets (we are going to refer to them as handheld devices) that support output of
data on Android Wear. We are going to create this kind of application in next tutorial.
In this tutorial we are going to learn how to connect your Android Wear emulator with your
handheld device.
Set up the handheld device
1. Download the Android Wear companion app on your handheld device from Google Play.
cJPlJ8Mp5L0.jpg1280x769 83 KB
2. Run the app and allow it access to the location of the device.
3. Enable USB debuging on your device.
On Android 4.0 and newer, you can find in here: Setting > Developer options.
Please notice:
on Android 4.2 and newer, Developer options is hidden by default. You can make it available like
this: go toSettings > About phone and tap Build number 7 times.
J_oR-0xbGwc.jpg1280x769 54.2 KB
4. Connect your handheld device to the computer with a USB cable
5. Check that your device is connected. For this you can use Android Debugs Bridge(ADB) - an
important command line tool for Android development.
For Windows:
Run command prompt(cmd command in the run menu). Go to the Android SDK
folder using cdcommand. Then go to platform tools folder. Now use command: adb.exe
devices. That command will list of all plugged Android devices.
For Linux:
Open terminal and run adb command with “device” flag. Iwill show how to do it on my system:
It showed that my Nexus 7 is attached.
Please notice:
If your list is empty, wait till USB driver is installed.
If your USB driver is installed and list is still empty, use this instruction,(this can occur if you have
Windows 8):http://stackoverflow.com/questions/21408674/adb-error-device-not-found40
If you want to know more about adb you can check Google
documentation:http://developer.android.com/tools/help/adb.html13
or read very good tutorial from Vogella:
http://www.vogella.com/tutorials/AndroidCommandLine/article.html16
Create AVD
You can read in my previous tutorial how to create Android Watch emulator (link in the beginning of
this post)
Connect handheld device with AVD
1. Forward the AVD's communication port to the connected handheld device. You can do it by
following command with adb:
Please notice: you need to do it each time you connect hadheld device.
2. Run Android Wear app on handheld device, go to Settings and click on "Connect to
emulator". (AVD has to be turned on)
3. Now AVD and handheld device are connected. You can send notifications, change the
appearance of the watch. Go to Settings and choose "Demo cards".
Here you can experiment with different demo cards.The cards you select appear as notifications on
the home screen of the emulator. For example, how much time you need to get to home or the
current weather.
Sum up
In this tutorial we connected Android Wear emulator with handheld device and sent sample
information to emulator
In next tutorial I will show you how to create your first app for handheld device, which will sent
custom notifications on watches. Please don't hesitate to ask any questions and leave feedback.
Thank you for reading.
Continue reading to Part 3 - Creating your first app!
www.smartwatch.me
[TUTORIAL] How to develop Android Wear apps for Beginners. Part 3 - Create
your first app "Hello World"
Studying new programming language always begins with "Hello World" program. We are going to do
the same and we will create an application for handheld devices that will send "Hello World"
notification to an Android Wear Device. In my previous tutorials you can read how to set up
development environment, create Android Wear emulator and connect it with your handheld device:
Firstly, we are going to look at the program structure in Android. Android applications usually consist
of the set of A...
Android wear notes

More Related Content

PPTX
How to create android applications
PPTX
Android chapter02-setup1-sdk
PPTX
Android App development III
PPTX
PDF
Android development module
PDF
Android Test Automation Workshop
PPT
Migrating Unity3D projects to Windows 8
PPTX
Android App development I
How to create android applications
Android chapter02-setup1-sdk
Android App development III
Android development module
Android Test Automation Workshop
Migrating Unity3D projects to Windows 8
Android App development I

What's hot (20)

DOCX
Installing android sdk on net beans
PPTX
Appium Mobile Testing: Nakov at BurgasConf - July 2021
PDF
Mobile App Testing ScanAgile 2012
PPTX
PPTX
Titanium Appcelerator - Beginners
PPTX
Developing Android Apps
PDF
Android tutorial1
PPTX
Getting Started with XCTest and XCUITest for iOS App Testing
PDF
Android Development Tools and Installation
PPTX
Android course (lecture2)
PDF
Bai thuc hanh lap trinh Android so 1
PDF
Interfacing android with embedded systems
PPTX
UI Testing for Your Xamarin.Forms Apps
PPT
Getting started with android dev and test perspective
PPT
Android tutorial
PPTX
Testing android apps with espresso
PPTX
Android development session 5 - Debug android studio
DOCX
Getting Enter in Android development
ODP
techSocAndroid1
DOCX
ID E's features
Installing android sdk on net beans
Appium Mobile Testing: Nakov at BurgasConf - July 2021
Mobile App Testing ScanAgile 2012
Titanium Appcelerator - Beginners
Developing Android Apps
Android tutorial1
Getting Started with XCTest and XCUITest for iOS App Testing
Android Development Tools and Installation
Android course (lecture2)
Bai thuc hanh lap trinh Android so 1
Interfacing android with embedded systems
UI Testing for Your Xamarin.Forms Apps
Getting started with android dev and test perspective
Android tutorial
Testing android apps with espresso
Android development session 5 - Debug android studio
Getting Enter in Android development
techSocAndroid1
ID E's features
Ad

Viewers also liked (17)

PPTX
PDF
Oil and gas cyber security nov 2012
PDF
Residential Surge Protection 1
PDF
Sumários Desenvolvidos de Filosofia do Direito
PPTX
Art in people’s life
DOC
PDF
172.набор новых сотрудников и проблема сохранения кадров специальный обзор
PPTX
Everything Out Organizing Style Personality Preference
PDF
Vize, Cesta Z Krize Petr Manas
PPT
Strategies to Enhance Pedestrian Safety: From Theory to Practice
PPSX
TIME Magazine Cover Portrait (Paintings)
PDF
Protect mobile agent against malicious host using partial mobility mechanism
PPT
HeroLympics Eng V03 Henk Vd Valk
PPTX
Acoustic Duet
PPT
Interfaccia, tra uomini, macchine, programmi: giochi e videogiochi
PPSX
The New Inbox and Other Innovations Part 2
Oil and gas cyber security nov 2012
Residential Surge Protection 1
Sumários Desenvolvidos de Filosofia do Direito
Art in people’s life
172.набор новых сотрудников и проблема сохранения кадров специальный обзор
Everything Out Organizing Style Personality Preference
Vize, Cesta Z Krize Petr Manas
Strategies to Enhance Pedestrian Safety: From Theory to Practice
TIME Magazine Cover Portrait (Paintings)
Protect mobile agent against malicious host using partial mobility mechanism
HeroLympics Eng V03 Henk Vd Valk
Acoustic Duet
Interfaccia, tra uomini, macchine, programmi: giochi e videogiochi
The New Inbox and Other Innovations Part 2
Ad

Similar to Android wear notes (20)

PDF
Final NEWS.pdf
PDF
Final NewsApp.pdf
PDF
Getting Started with Android Studio: A Step-by-Step Guide
PPT
Android Studio Software Installation steps in windows.
PDF
Homework seriesandroidworkshop JUly 12th
PPTX
this is PPT for mobail application development
PDF
Bird.pdf
PPT
Getting started with android studio
PPTX
androidstudio.pptx
PPTX
Android software development – the first few hours
PPTX
Module-I_Introduction-to-Android.pptx
PPTX
Introduction_to_android_and_android_studio
PPTX
Creating the first app with android studio
PPTX
Introduction to Android and Java.pptx
PPTX
Getting started with immersive technologies
PDF
Getting started with appium
PDF
Appium- part 1
PPTX
Build Your First Android App
DOCX
Android Programing Course Material Labs
PPTX
Final NEWS.pdf
Final NewsApp.pdf
Getting Started with Android Studio: A Step-by-Step Guide
Android Studio Software Installation steps in windows.
Homework seriesandroidworkshop JUly 12th
this is PPT for mobail application development
Bird.pdf
Getting started with android studio
androidstudio.pptx
Android software development – the first few hours
Module-I_Introduction-to-Android.pptx
Introduction_to_android_and_android_studio
Creating the first app with android studio
Introduction to Android and Java.pptx
Getting started with immersive technologies
Getting started with appium
Appium- part 1
Build Your First Android App
Android Programing Course Material Labs

Recently uploaded (20)

PDF
Download FL Studio Crack Latest version 2025 ?
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Nekopoi APK 2025 free lastest update
PDF
medical staffing services at VALiNTRY
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
Download FL Studio Crack Latest version 2025 ?
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Advanced SystemCare Ultimate Crack + Portable (2025)
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Designing Intelligence for the Shop Floor.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Reimagine Home Health with the Power of Agentic AI​
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Oracle Fusion HCM Cloud Demo for Beginners
Internet Downloader Manager (IDM) Crack 6.42 Build 41
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Salesforce Agentforce AI Implementation.pdf
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
CHAPTER 2 - PM Management and IT Context
Why Generative AI is the Future of Content, Code & Creativity?
Nekopoi APK 2025 free lastest update
medical staffing services at VALiNTRY
wealthsignaloriginal-com-DS-text-... (1).pdf

Android wear notes

  • 1. [TUTORIAL] How to develop Android Wear apps for Beginners. Part 1 - Setup AndroidWear apps tutorial androidwear dev calmarj Jan 16 13 Android Wear is a new version of the Android system designed specifically for wearables , which was announced by Google in march 2014. Currently lots of devices running on Android Wear were released, including well designed Moto 360 and Gear Live by Samsung.But still, amount of applications using all the benefits of Android Wear in Google Play is considerably small. In this tutorial I'm going to show you how to create apps for Android Wear from Scratch. Set up the Android development environment Studying every new technology begins with launching "Hello World" example. But first you need to set your development environment.  JDK – development kit for Java programming language  Android Studio – IDE to make our Android apps  Android SDK – special development kit for Android development  Android Virtual Device – emulator to test our apps JDK Android applications are usually developed in Java programming language using the Software Development Kit. That's why we need to download SDK for working with Java. 1) Download the Java SE Development Kit (JDK) from this site:http://www.oracle.com/technetwork/java/javase/downloads/175 2) Click Download from the JDK section of the 'Java Platform, Standard Edition' table. 3) Install the JDK environment with default setting You can find more detailed instruction here: http://www.oracle.com/technetwork/java/javase/index-137561.html24
  • 2. Android Studio Google developed its own environment for Android applications with lots of perks for development. You can download it here: http://developer.android.com/sdk/index.html190 Here are steps for installation Android Studio on Windows and Linux. For MAC they are pretty similar. Installation for Windows: 1) Download and run **android-studio-bundle-(your version).exe**, then click on the "Next" button. 2) Leave all default settings untouched and click the **"Next"** button.
  • 3. 3) Agree with all license agreements and click the "Next" button.
  • 5. 4) Choose a path where to install Android Studio and Android SDK.(**Please note**: use only ASCII characters - english letters) 5) Android SDK includes Android device emulator. It means you can use emulator when you don't have Android Wear Watch. I'm going to use emulator in this tutorial. Emulator for Windows requires installation of the Intel Hardware Accelerated Execution Manager (Intel HAXM). In this window you can adjust the amount of memory avaliable for HAXM. Leave it recommended and click the "Next" button.
  • 6. 6) Select or create a folder in which you would like to create the program's shortcut.
  • 7. 7) Now the installation of Android Studio begins. Required time depends on your computer. For me it took about half an hour. Next click on the «Finish» button.
  • 8. 2q3B44znmHQ.jpg797x606 62.5 KB Installation for Linux: Download android-studio-ide-(your-version)-linux.zip. Unzip it (Please note: don't use non ASCII characters in istallation path). Open terminal, go to Android Studio folder, then go the bin folder and runstudio.sh script. These steps you can see in the screenshot for my system - Ubuntu 14.10.
  • 9. qf46TCrt7zY.jpg722x462 35.4 KB Android SDK The start window of Android Studio should appear after the installation.(click on created shortcut if the start window did not appear(for Windows) or run script studio.sh(for Linux)). Android platform includes systems for phones, tvs and watches, so we need to download special development toolkit for Android Wear. Click on"Configure" button and turn on SDK Manager.
  • 10. TEPyZZOW_eI.jpg807x617 51.4 KB If you want to test your applications on emulator, you also need to download virtual images, (Intel x86 images will work faster). I recommend you to download samples for SDK, we are going to study them later. If you want to test your application for different Android Wear versions, you need to download SDK and virtual image for Android 4.4. Don't change default settings (so USB driver will be installed. It maintains correct plugging a device into a computer.) Next click on "Install" button and agree with licence agreement.
  • 11. H7Ui-u42yjQ.jpg531x807 115 KB SDK installation can take a while(about couple of hours). Creating new project Having downloaded SDK, we move to creating your first Android Wear application. More precisely we are going to study one of the samples provided by Google. 1. Run Android Studio and Click Option «Import an Android code sample»
  • 12. l71AnjZ637E.jpg797x606 65.4 KB 2. Type "Wear" in the searching box and choose "Skeleton Wearable App". Then click on the "Next"button.
  • 13. r5MLKA-KOOE.jpg807x492 38.4 KB 3. Now you can choose the name and path of your project. (Please note: don't change it unless there are non ASCII characters) and click "Finish":
  • 14. ISlD7htljss.jpg807x489 31.2 KB 4. Wait till the project is downloaded and built. Please notice: If you can see the error like: "Failed to import new Gradle project: failed to find Build Tools revision xx.xx.xx " then you don't have the latest version of the build tool. One of the main benefits of Android Studio is that it can do menial work. Just click on "Install and sync project". Your first project is done. Now we need a watch to test an application. You can use an emulator if you don't have a watch. Set up an Android Wear Virtual Device(AVD) 1. Click Tools>Android>AVD Manager or click on corresponding button in the panel:
  • 15. cne4wz9gQVY.jpg807x489 30.2 KB 2. Click Create Virtual Device and after that choose category Wear in List and select Square or Round Android Wear(you can see that Iselected Round) and click "Next":
  • 16. 1Bf0CYYLM2w.jpg807x492 38 KB 3. Choose Android Wear version(I chose Lollipop for this tutorial, because it's the latest version and most user-friendly, in my opinion.) and click "Next":
  • 17. WToOaF9mxUU.jpg807x484 41.4 KB 4. Now you can change name of your AVD (I named it Smartwatch tutorial),choice of screen or firmware. Also you can turn on Host GPU (better do it, that way the emulator will use computer video card for rendering). You can also turn on "Store a snapshot for faster startup". It lets AVD Manager to save system state on hard disk after you finish working with emulator. It allows you to run the emulator faster, because any Android emulator runs really slow(except third-party emulators, like Genomytion) After you finish setting click on the "Finish" button.
  • 18. lsqjJs44rGk.jpg807x484 39.7 KB 5. Emulator created successfully.
  • 19. fr9lLTI-Vck.jpg807x431 25.4 KB 6. Now you can run the emulator, it can take a while. After that you can study how to work with Android Wear following instructions.
  • 20. Run the app We need to set startup configuration to run this app. Click a field left from "Run", there you can "Edit Configuration" or choose module to run.Choose "Wearable"(because we are going to run the application for watches) and click on "Run". Now we can see the list of devices ready for the application to be installed on. Choose the emulator we created early. (you need to run the emulator first.)
  • 21. xzjRWgC4Jo8.jpg807x401 34.7 KB After the application is started click on "Show Notification" button, and application should show you sample notifications. You can see that this sample is not adapted for round shape of the watches. You have to avoid
  • 22. this while developing applications for Android Wear. Sum up In this tutorial we set up our system for development applications and ran our first Android Wear application. In next tutorial I will show you how to connect your watches(or emulator) with your phone(or tablet). Please don't hesitate to ask any questions and leave feedback. Thank you for reading. Building Apps for Wearables These classes teach you how to build notifications in a handheld app that are automatically synced to wearables as well as how to build apps that run on wearables.
  • 23. Note: For more information about the APIs used in these training classes, see the Wear API reference documentation. 1. Adding Wearable Features to Notifications How to build handheld notifications that are synced to and look great on wearables. 1. Creating a Notification 2. Receiving Voice Input in a Notification 3. Adding Pages to a Notification 4. Stacking Notifications 2. Creating Wearable Apps How to build apps that run directly on wearables. 1. Creating and Running a Wearable App 2. Creating Custom Layouts 3. Keeping Your App Visible 4. Adding Voice Capabilities 5. Packaging Wearable Apps 6. Debugging over Bluetooth 3. Creating Custom UIs How to create custom user interfaces for wearable apps. 1. Defining Layouts 2. Creating Cards 3. Creating Lists
  • 24. 4. Creating a 2D Picker 5. Showing Confirmations 6. Exiting Full-Screen Activities 4. Sending and Syncing Data How to sync data between handhelds and wearables. 1. Accessing the Wearable Data Layer 2. Syncing Data Items 3. Transferring Assets 4. Sending and Receiving Messages 5. Handling Data Layer Events 5. Creating Watch Faces How to create watch faces for wearables. 1. Designing Watch Faces 2. Building a Watch Face Service 3. Drawing Watch Faces 4. Showing Information in Watch Faces 5. Creating Interactive Watch Faces 6. Providing Configuration Activities 7. Addressing Common Issues 8. Optimizing Performance and Battery Life 6. Detecting Location
  • 25. How to detect location data on Android Wear devices. [TUTORIAL] How to develop Android Wear apps for Beginners. Part 2 - Connect Android Wear with handheld device AndroidWear androidwear tutorial dev 1 / 4 calmarj Jan 17 9 In my previous tutorial I told you how to set your development environment for Android Wear, create and run a project from Google samples, and how to create Android Wear (AVD). You can read it here: www.smartwatch.me [TUTORIAL] How to develop Android Wear apps for Beginners. Part 1 - Setup Android Wear is a new version of the Android system designed specifically for wearables , which was announced by Google in march 2014. Currently lots of devices running on Android Wear were released, including well designed Moto 360 and Gear Live by Samsung.But still, amount of applications using all the benefits of Android Wear in Google Play is considerably small. In this tutorial I'm going to show you how to create apps for Android Wear from Scratch. Set up the Android development en... You can develop not only Wearable apps with Android Wear SDK, but also you can create apps for smartphones and tablets (we are going to refer to them as handheld devices) that support output of data on Android Wear. We are going to create this kind of application in next tutorial. In this tutorial we are going to learn how to connect your Android Wear emulator with your handheld device. Set up the handheld device
  • 26. 1. Download the Android Wear companion app on your handheld device from Google Play. cJPlJ8Mp5L0.jpg1280x769 83 KB 2. Run the app and allow it access to the location of the device. 3. Enable USB debuging on your device. On Android 4.0 and newer, you can find in here: Setting > Developer options. Please notice: on Android 4.2 and newer, Developer options is hidden by default. You can make it available like this: go toSettings > About phone and tap Build number 7 times.
  • 27. J_oR-0xbGwc.jpg1280x769 54.2 KB 4. Connect your handheld device to the computer with a USB cable 5. Check that your device is connected. For this you can use Android Debugs Bridge(ADB) - an important command line tool for Android development. For Windows: Run command prompt(cmd command in the run menu). Go to the Android SDK folder using cdcommand. Then go to platform tools folder. Now use command: adb.exe devices. That command will list of all plugged Android devices. For Linux: Open terminal and run adb command with “device” flag. Iwill show how to do it on my system: It showed that my Nexus 7 is attached. Please notice: If your list is empty, wait till USB driver is installed.
  • 28. If your USB driver is installed and list is still empty, use this instruction,(this can occur if you have Windows 8):http://stackoverflow.com/questions/21408674/adb-error-device-not-found40 If you want to know more about adb you can check Google documentation:http://developer.android.com/tools/help/adb.html13 or read very good tutorial from Vogella: http://www.vogella.com/tutorials/AndroidCommandLine/article.html16 Create AVD You can read in my previous tutorial how to create Android Watch emulator (link in the beginning of this post) Connect handheld device with AVD 1. Forward the AVD's communication port to the connected handheld device. You can do it by following command with adb: Please notice: you need to do it each time you connect hadheld device. 2. Run Android Wear app on handheld device, go to Settings and click on "Connect to emulator". (AVD has to be turned on) 3. Now AVD and handheld device are connected. You can send notifications, change the appearance of the watch. Go to Settings and choose "Demo cards". Here you can experiment with different demo cards.The cards you select appear as notifications on the home screen of the emulator. For example, how much time you need to get to home or the
  • 29. current weather. Sum up In this tutorial we connected Android Wear emulator with handheld device and sent sample information to emulator In next tutorial I will show you how to create your first app for handheld device, which will sent custom notifications on watches. Please don't hesitate to ask any questions and leave feedback. Thank you for reading. Continue reading to Part 3 - Creating your first app! www.smartwatch.me [TUTORIAL] How to develop Android Wear apps for Beginners. Part 3 - Create your first app "Hello World" Studying new programming language always begins with "Hello World" program. We are going to do the same and we will create an application for handheld devices that will send "Hello World" notification to an Android Wear Device. In my previous tutorials you can read how to set up development environment, create Android Wear emulator and connect it with your handheld device: Firstly, we are going to look at the program structure in Android. Android applications usually consist of the set of A...