SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
Android Wear
Yep, it is wearable now!
Who am I?
Co-Founder / CEO at
Android&iOS Developer
Co-Organizer at GDG Ankara
Android Evangelist
ADD ‘15
Wearables
are
Everywhere
You can catch the trend
with Android Wear!
It is easy to implement
Even for iOS now!
Notifications
If you send your notifications to your
app, it appears on Wear, too!



Only if you use NotificationCompat
class
Example
pI = PendingIntent.getActivity(this, 0, new
Intent(this,MainActivity.class), 0);

pIExtra = PendingIntent.getActivity(this, 0, new
Intent(Intent.ACTION_DIAL),0);
Example
NotificationCompat.Action action = new
NotificationCompat.Action.Builder(android.R.dra
wable.ic_btn_speak_now, "Reply!",pIExtra).build();

Example
NotificationCompat.Builder mBuilder =

new NotificationCompat.Builder(this)

.setSmallIcon(R.mipmap.ic_launcher)

.setContentTitle("TEST")

.setContentText("Test Mesasge!")

.extend(new NotificationCompat.WearableExtender().addAction(action));


mBuilder.setContentIntent(pI);

mBuilder.setDefaults(Notification.DEFAULT_SOUND);

mBuilder.setAutoCancel(true);

NotificationManager mNotificationManager =
(NotificationManager)this.getSystemService(Context.NOTIFICATION_SERVICE);

mNotificationManager.notify(1, mBuilder.build());
Example
It will be shown on the
handset as usual.
But if an Android Wear is
connected to the handset,
it will be look like this! >
Android Wear Apps
EVEN
Setting Up!
Wear Emulator
&
Android Device
Create an Android Wear emulator
Install Android Wear app to your phone
Connect your phone to your computer
Open up Terminal and make the port forwarding
via this command: 

adb -d forward tcp:5601 tcp:5601
Run the Android Wear Emulator and select “pair
with emulator” option from Android Wear app
It is DONE!
You can start to develop
for Android Wear, now!
A little DEMO! :)
Thank You!
Let’s keep in touch
@orhunmertsimsek
mert@4pps.co
Slide:
http://goo.gl/BdsCrP

Más contenido relacionado

Similar a Make Your Existing App Android Wear Compatible

Break Timer: Android-wear introduction and application case-study
Break Timer: Android-wear introduction and application case-studyBreak Timer: Android-wear introduction and application case-study
Break Timer: Android-wear introduction and application case-studyUmair Vatao
 
"It's Time" - Android Wear codelab - GDG MeetsU - L'Aquila
"It's Time" - Android Wear codelab - GDG MeetsU - L'Aquila"It's Time" - Android Wear codelab - GDG MeetsU - L'Aquila
"It's Time" - Android Wear codelab - GDG MeetsU - L'AquilaGiuseppe Cerratti
 
8º Betabeers Granada: Android Wear por GDG Granada
8º Betabeers Granada: Android Wear por GDG Granada8º Betabeers Granada: Android Wear por GDG Granada
8º Betabeers Granada: Android Wear por GDG GranadaJM Robles
 
Introduction to Android Wear
Introduction to Android WearIntroduction to Android Wear
Introduction to Android Weargabrielemariotti
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...mharkus
 
Getting Ready For Android Wear
Getting Ready For Android WearGetting Ready For Android Wear
Getting Ready For Android WearRaveesh Bhalla
 
Developing for Android Wear
Developing for Android WearDeveloping for Android Wear
Developing for Android WearCan Elmas
 
Android Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docxAndroid Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docxkarthikaparthasarath
 
Exercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone callExercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone callmaamir farooq
 
Android Wear Presentation
Android Wear PresentationAndroid Wear Presentation
Android Wear PresentationZi Yong Chua
 
Wearables + Azure development
Wearables + Azure developmentWearables + Azure development
Wearables + Azure developmentAndri Yadi
 
Session #8 adding magic to your app
Session #8  adding magic to your appSession #8  adding magic to your app
Session #8 adding magic to your appVitali Pekelis
 
Android Wear - Manuel Vicente Vivo
Android Wear - Manuel Vicente VivoAndroid Wear - Manuel Vicente Vivo
Android Wear - Manuel Vicente VivoManuel Vicente Vivo
 
Android Evolution, AppForum 2014, Brussels, Friedger Müffke
Android Evolution, AppForum 2014, Brussels, Friedger MüffkeAndroid Evolution, AppForum 2014, Brussels, Friedger Müffke
Android Evolution, AppForum 2014, Brussels, Friedger MüffkeFriedger Müffke
 
Introduction to Android Programming
Introduction to Android ProgrammingIntroduction to Android Programming
Introduction to Android ProgrammingRaveendra R
 
Build your own remote control. Droidcon greece 2016
Build your own remote control. Droidcon greece 2016Build your own remote control. Droidcon greece 2016
Build your own remote control. Droidcon greece 2016Jesus Gumiel
 

Similar a Make Your Existing App Android Wear Compatible (20)

Break Timer: Android-wear introduction and application case-study
Break Timer: Android-wear introduction and application case-studyBreak Timer: Android-wear introduction and application case-study
Break Timer: Android-wear introduction and application case-study
 
"It's Time" - Android Wear codelab - GDG MeetsU - L'Aquila
"It's Time" - Android Wear codelab - GDG MeetsU - L'Aquila"It's Time" - Android Wear codelab - GDG MeetsU - L'Aquila
"It's Time" - Android Wear codelab - GDG MeetsU - L'Aquila
 
8º Betabeers Granada: Android Wear por GDG Granada
8º Betabeers Granada: Android Wear por GDG Granada8º Betabeers Granada: Android Wear por GDG Granada
8º Betabeers Granada: Android Wear por GDG Granada
 
Android Wear Development
Android Wear DevelopmentAndroid Wear Development
Android Wear Development
 
DAY2.pptx
DAY2.pptxDAY2.pptx
DAY2.pptx
 
How to create android push notifications with custom view
How to create android push notifications with custom viewHow to create android push notifications with custom view
How to create android push notifications with custom view
 
Introduction to Android Wear
Introduction to Android WearIntroduction to Android Wear
Introduction to Android Wear
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
 
Getting Ready For Android Wear
Getting Ready For Android WearGetting Ready For Android Wear
Getting Ready For Android Wear
 
Developing for Android Wear
Developing for Android WearDeveloping for Android Wear
Developing for Android Wear
 
Android Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docxAndroid Lab Mannual 18SUITSP5.docx
Android Lab Mannual 18SUITSP5.docx
 
Exercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone callExercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone call
 
Android Wear Presentation
Android Wear PresentationAndroid Wear Presentation
Android Wear Presentation
 
Wearables + Azure development
Wearables + Azure developmentWearables + Azure development
Wearables + Azure development
 
Session #8 adding magic to your app
Session #8  adding magic to your appSession #8  adding magic to your app
Session #8 adding magic to your app
 
Android Wearable App
Android Wearable AppAndroid Wearable App
Android Wearable App
 
Android Wear - Manuel Vicente Vivo
Android Wear - Manuel Vicente VivoAndroid Wear - Manuel Vicente Vivo
Android Wear - Manuel Vicente Vivo
 
Android Evolution, AppForum 2014, Brussels, Friedger Müffke
Android Evolution, AppForum 2014, Brussels, Friedger MüffkeAndroid Evolution, AppForum 2014, Brussels, Friedger Müffke
Android Evolution, AppForum 2014, Brussels, Friedger Müffke
 
Introduction to Android Programming
Introduction to Android ProgrammingIntroduction to Android Programming
Introduction to Android Programming
 
Build your own remote control. Droidcon greece 2016
Build your own remote control. Droidcon greece 2016Build your own remote control. Droidcon greece 2016
Build your own remote control. Droidcon greece 2016
 

Último

9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7Pooja Nehwal
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Pooja Nehwal
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRnishacall1
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceanilsa9823
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPsychicRuben LoveSpells
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceanilsa9823
 

Último (7)

9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
 

Make Your Existing App Android Wear Compatible

Notas del editor

  1. * Introduction * Thanks jPrime and JUG community * will talk about Android Wear
  2. * google developer groups ankara
  3. some of the android wear devices samsung, intel, motorola, lg round and square ones
  4. activity tracking(running, exercising) apps monitoring your heart rate messaging apps phones’ batteries last longer with android wear don’t need to check phone on every little sound!
  5. now, how to make our existing apps, wearable compatible the easiest one, notifications
  6. the same notification will be seen in the Android Wear device as well. The only thing to do is using NotificationCompat class to create notifications. in the picture, you can see an example screenshot of hangouts app, both on handset and wear.
  7. So how to make this? first of all create pending intents that will be triggered when actions are called on notifications. These are like usual notifications on handset. in this example there are two pending intents, first one opens the MainActivity, the second one opens the dialler application.
  8. * Then we create an action with NotificationCompat class. It is for an extra button for the notification.
  9. Then again we use NotificationCompat class to build a notification. The trick of the code is, we add the “action” that we created on previous slide, just to shown on the wearable device, not on the handset. It is done by NotificationCompat.WearableExtender() If you add actions by using this, these actions will only shown on wears.
  10. This is how it will look like, almost. The notification will be shown on the handset, either. But without the “Reply” action.
  11. The comparison of the notifications on handset and wear. As you see, there are less information, less detail on the wear. So we should care about this. Simple is the best, especially on the Wear! :)
  12. Some example screens of wear notifications. You can also get input from wear. Especially with voice, but if it is not possible you can get input with short commands. Like yes,no,maybe. They are useful for the environment that is not suitable to get voice input.
  13. The other thing to make your Android app, Android Wear compatible is the “REAL WEAR APPS” They are almost like usual Android apps, but with less resource. I will not talk about the Android Wear apps in detail. But let’s look it a little.
  14. These are some of the Android Wear apps on the Play Store There are lots of Wear apps on the Play Store and their amount is increasing day by day.
  15. A calculator app for wear, a screen light app, and an app that has a great ux/ui for wearables — a weather app.
  16. YES, there is no limit with your imagination. Just one limit! Resource :) You must care for battery, ram, cpu of the Wearable device.
  17. now let’s set up the development environment. we just need the android studio and the latest sdk’s of android and android wear. And an Android device also :)
  18. There is one important thing to take care. Every time that you connect your phone to the computer via USB, you should make the port forwarding again. Otherwise, the Wear emulator and the phone will not be paired.
  19. Yes we are ready now. Let’s make a demo
  20. Thank you for listening me. I am very happy to be here. Thanks again to jPrime team! You can contact me via twitter and e-mail. Now, if we have enough time, i can try to answer your questions.