SlideShare a Scribd company logo
Introduction to 
Android Wear 
Talk by Chua Zi Yong 
https://plus.google.com/+ZiYongChu 
a
Learn more at www.gdg-sg.org/member 
• Keep up to date with Google products and technologies 
• Make new friends that are also passionate about technology 
• Interact with Googlers 
• Access to selected exclusive Google events 
• Find jobs and developers related to Google products 
• Contribute to developer community
Learn more at www.gdg-sg.org/member 
Because pictures speak a thousand words
Learn more at www.gdg-sg.org/member 
For more membership details, 
Visit http://bit.ly/gdg-sg-members 
Get started today with just your email.
What is Android Wear? 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
What is Android Wear? 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
Notifications 
Apps on Wear 
Android Fit
What is Android Wear? 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
What is Android Wear? 
Requires Android 4.3 and above Android 
device 
Latest Google Play Services and Android Wear 
app from Google Play installed 
Internet and connectivity over bluetooth from 
paired device 
Limited function when connection is lost 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Getting Started – Install 
SDK 
Install the Android Wear SDK Tools from ADT 
• Android ADT Revision v22.6 and above 
• Android Wear ARM EABI v7a system image 
• Update Android Support Library 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Getting Started – Install 
emulator 
To install and test Android Wear emulator, you 
need to (visit http://javapapers.com/android/android-wear-getting-started-tutorial/ 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
for full details) 
1) Sign up for developer preview 
http://developer.android.com/wear/preview/signup.html 
2) Create AVD 
3) Connect Android device over adb (adb -d forward tcp:5601 
tcp:5601) 
4) Install Android Wear Preview from Google Play
Design for Wear 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
Wear apps should be 
• Launched automatically 
• Glance-able 
• Works like a personal butler 
• Zero to low interactions
Design for Wear 
Two ways you can think of Wear 
Interactions 
• Extension of existing Android app notifications to work 
better on Android Wear (existing notifications on phone 
already appears on Wear) 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
• Android Wear specific app
Notifications for Wear 
Extending your existing notifications to 
Wear 
• You can add voice input/actions directly from Wear 
• You can add additional content in pages 
• By swiping left/right on the wearable 
• You can stack multiple notifications 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Notifications for Wear 
Adding actions to Wear (It is very 
simple) 
• The same code before works the same on Wear (Including 
notification actions, big view) 
• Use NotificationCompat.WearableExtender() for Wearable-only 
options (Appears only on Wear, not on phone) 
• You can use addRemoteInput(remoteInput) to prompt user 
for voice input 
• P.S. Always use the NotificationManagerCompat instead of 
NotificationManager (to support 4.1 and above features) 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Notifications for Wear 
Adding actions to Wear (Eliza sample 
cNootidficaetio)nCompat.Builder builder = new NotificationCompat.Builder(this) // All the usual 
stuffs 
.setContentTitle(getString(R.string.eliza)) 
.setContentText(mLastResponse) 
.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.bg_eliza)) 
.setSmallIcon(R.drawable.bg_eliza) 
.setPriority(NotificationCompat.PRIORITY_MIN); 
Intent intent = new Intent(ACTION_RESPONSE); // Intent to do your stuff 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
PendingIntent pendingIntent = PendingIntent.getService(this, 0, intent, 
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_CANCEL_CURRENT); 
Notification notification = builder 
.extend(new NotificationCompat.WearableExtender() // New notification 
extension for Wear 
.addAction(new NotificationCompat.Action.Builder( 
R.drawable.ic_full_reply, getString(R.string.reply), pendingIntent) // 
Get voice input 
.addRemoteInput(new RemoteInput.Builder(EXTRA_REPLY) 
.setLabel(getString(R.string.reply)) 
.build()) 
.build())) 
.build(); 
NotificationManagerCompat.from(this).notify(0, notification);
Notifications for Wear 
Extending your existing notifications to 
Wear 
• You can add voice input/actions directly from Wear 
• You can add additional content in pages 
• By swiping left/right on the wearable 
• You can stack multiple notifications 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Notifications for Wear 
Adding additional content in pages 
(many at one time) 
• For example, showing results of nearby search 
• First, create an array list of notifications 
• Next, generate a notification for each page you want to 
display, and add them to your array list 
• Last, use .addPages(List<Notifications>)to parse in your array 
list 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Notifications for Wear 
Adding additional content in pages (one 
at a time) 
• First, create the main (first) notification builder 
• Next, create the new notification you want to insert 
• Last, use .addPage(Notification) to add your notification 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Notifications for Wear 
Adding additional content in pages 
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) // 
Main 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
.setSmallIcon(R.drawable.new_message) 
.setContentTitle("Page 1") 
.setContentText("Short message") 
.setContentIntent(viewPendingIntent); 
Notification secondPageNotification = new NotificationCompat.Builder(this) // Second 
Notification 
.build(); 
Notification twoPageNotification = new WearableExtender() 
.addPage(secondPageNotification) // Add second notification to main 
.extend(notificationBuilder) 
.build(); 
notificationManager = NotificationManagerCompat.from(this); 
notificationManager.notify(notificationId, twoPageNotification);
Notifications for Wear 
Extending your existing notifications to 
Wear 
• You can add voice input/actions directly from Wear 
• You can add additional content in pages 
• By swiping left/right on the wearable 
• You can stack multiple notifications 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Notifications for Wear 
Stacking multiple notifications 
• Use .setGroup(String key) to group your new notification to 
existing group 
• Use notify() to send the notification to Wear 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Notifications for Wear 
Stacking multiple notifications 
final static String GROUP_KEY_EMAILS = "group_key_emails"; // Key for group 
ID 
Notification notif = new NotificationCompat.Builder(mContext) 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
.setContentTitle("New mail from " + sender1) 
.setContentText(subject1) 
.setSmallIcon(R.drawable.new_mail); 
.setGroup(GROUP_KEY_EMAILS) // Set group ID into notification 
.build(); 
NotificationManagerCompat notificationManager = 
NotificationManagerCompat.from(this); 
notificationManager.notify(notificationId1, notif); // Send out the notification
Design for Wear 
Two ways you can think of Wear 
Interactions 
• Extension of existing Android app notifications to work better 
on Android Wear (existing notifications on phone already 
appears on Wear) 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
• Android Wear specific app
Wear App API Architecture 
Phone APK Wear APK 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Wear App API Architecture 
Node API 
- Inform when Wear is connected 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
Message API 
- Manage API calls 
between devices 
Data API 
- Centralized data store 
managed by GPS 
GPS 
Magic
Wear App API Architecture 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Wear App API Architecture 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Wear App API Architecture 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Wear App API Architecture 
To start communicating with the Wearable, we 
need to initialize the GoogleApiClient on the 
phone APK 
mGoogleApiClient = new GoogleApiClient.Builder(this) 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
.addApi(Wearable.API) 
.build(); 
mGoogleApiClient.connect();
Wear App API Architecture 
WearableListenerService will handle all the 
callbacks from Google Play Services on wear 
// Insert the service into the manifest of the Weak.apk, in this case name it 
// AppListenerService (subclass of Abstract class WearableListenerService) 
<service 
android:name=“.AppListenerService”> 
<intent-filter> 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
<action 
android:name=“com.google.android.gms.wearable.BIND_LISTENER”/ 
> 
</intent-filter> 
</service>
Wear App API Architecture 
In AppListenerService.java, you can manage 
the callbacks from Node, Data and Message 
listeners 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Add Voice Action to Wear 
You can trigger your app through voice actions 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Add Voice Action to Wear 
Just add the intent filter to your WearActivitiy 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
<activity 
android:name=“MyWearActivity”> 
<intent-filter> 
<action android:name=“android.intent.action.SEND”/> 
<category android:name = 
“com.google.android.voicesearch.SELF_NOTE”/> 
</intent-filter> 
</activity>
Add Voice Action to Wear 
Available commands today (approval process 
similar to Google Glass) 
More details: 
https://developer.android.com/training/wearables/apps/voice. 
html 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Add Voice Action to Wear 
Alternatively, you can use “Start 
MyVoiceAction” to launch your app. Just 
declare in manifest under label. 
<activity android:name=“MyWearActivity" Android:label=“MyVoiceAction"> 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
<intent-filter> 
<action android:name="android.intent.action.MAIN" /> 
<category 
android:name="android.intent.category.LAUNCHER" /> 
</intent-filter> 
</activity>
Add Voice Action to Wear 
For additional input, say “Take a note”, follow 
by user voice input, you can get the voice 
input by calling startActivityForResult 
// Create an intent that can start the Speech Recognizer activity 
private void displaySpeechRecognizer() { 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua 
Intent intent = new 
Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); 
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, 
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); 
startActivityForResult(intent, SPEECH_REQUEST_CODE); 
}
What is Android Wear? 
Code Demo Time 
Introduction to Android Wear by Chua Zi Yong - 
https://plus.google.com/+ZiYongChua
Learn more at www.gdg-sg.org/member 
• Keep up to date with Google products and technologies 
• Make new friends that are also passionate about technology 
• Interact with Googlers 
• Access to selected exclusive Google events 
• Find jobs and developers related to Google products 
• Contribute to developer community
Learn more at www.gdg-sg.org/member 
Because pictures speak a thousand words
Learn more at www.gdg-sg.org/member 
For more membership details, 
Visit http://bit.ly/gdg-sg-members 
Get started today with just your email.

More Related Content

What's hot

Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5
Chris Griffith
 
Android Wearable App
Android Wearable AppAndroid Wearable App
Android Wearable App
Mindfire Solutions
 
Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5
Chris Griffith
 
Android workshop - 02. Glass development 101
Android workshop - 02. Glass development 101Android workshop - 02. Glass development 101
Android workshop - 02. Glass development 101
Johnny Sung
 
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for AndroidYour First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
Motorola Mobility - MOTODEV
 
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
Umair Vatao
 
Making Money with Adobe AIR
Making Money with Adobe AIRMaking Money with Adobe AIR
Making Money with Adobe AIR
Almog Koren
 
Android Wearable App Development - 1
Android Wearable App Development - 1Android Wearable App Development - 1
Android Wearable App Development - 1
Ketan Raval
 
The unconventional devices for the Android video streaming
The unconventional devices for the Android video streamingThe unconventional devices for the Android video streaming
The unconventional devices for the Android video streaming
Matteo Bonifazi
 
Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5
Chris Griffith
 
Google Glass, the GDK, and HTML5
Google Glass, the GDK, and HTML5Google Glass, the GDK, and HTML5
Google Glass, the GDK, and HTML5
Oswald Campesato
 
I/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in AndroidI/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in Android
Sittiphol Phanvilai
 
UI Testing for Your Xamarin.Forms Apps
UI Testing for Your Xamarin.Forms AppsUI Testing for Your Xamarin.Forms Apps
UI Testing for Your Xamarin.Forms Apps
Codrina Merigo
 
Google Glasses Integration with SAP
Google Glasses Integration with SAPGoogle Glasses Integration with SAP
Google Glasses Integration with SAP
Gh14Cc10
 
Android TV: Building apps with Google’s Leanback Library
Android TV: Building apps with  Google’s Leanback LibraryAndroid TV: Building apps with  Google’s Leanback Library
Android TV: Building apps with Google’s Leanback Library
Joe Birch
 
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
PushApps - Content Recommendation in Push Notifications
 
Android tv get started
Android tv get startedAndroid tv get started
Android tv get started
Ascii Huang
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
Abid Khan
 
Android N multi window
Android N multi windowAndroid N multi window
Android N multi window
Yu-Wei Chuang
 
What’s New in iOS 8 SDK ?
What’s New in iOS 8 SDK ?What’s New in iOS 8 SDK ?
What’s New in iOS 8 SDK ?
E2LOGY
 

What's hot (20)

Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5
 
Android Wearable App
Android Wearable AppAndroid Wearable App
Android Wearable App
 
Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5Developing AIR for Android with Flash Professional CS5
Developing AIR for Android with Flash Professional CS5
 
Android workshop - 02. Glass development 101
Android workshop - 02. Glass development 101Android workshop - 02. Glass development 101
Android workshop - 02. Glass development 101
 
Your First Adobe Flash Application for Android
Your First Adobe Flash Application for AndroidYour First Adobe Flash Application for Android
Your First Adobe Flash Application for Android
 
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
 
Making Money with Adobe AIR
Making Money with Adobe AIRMaking Money with Adobe AIR
Making Money with Adobe AIR
 
Android Wearable App Development - 1
Android Wearable App Development - 1Android Wearable App Development - 1
Android Wearable App Development - 1
 
The unconventional devices for the Android video streaming
The unconventional devices for the Android video streamingThe unconventional devices for the Android video streaming
The unconventional devices for the Android video streaming
 
Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5
 
Google Glass, the GDK, and HTML5
Google Glass, the GDK, and HTML5Google Glass, the GDK, and HTML5
Google Glass, the GDK, and HTML5
 
I/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in AndroidI/O Rewind 215: What's new in Android
I/O Rewind 215: What's new in Android
 
UI Testing for Your Xamarin.Forms Apps
UI Testing for Your Xamarin.Forms AppsUI Testing for Your Xamarin.Forms Apps
UI Testing for Your Xamarin.Forms Apps
 
Google Glasses Integration with SAP
Google Glasses Integration with SAPGoogle Glasses Integration with SAP
Google Glasses Integration with SAP
 
Android TV: Building apps with Google’s Leanback Library
Android TV: Building apps with  Google’s Leanback LibraryAndroid TV: Building apps with  Google’s Leanback Library
Android TV: Building apps with Google’s Leanback Library
 
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
 
Android tv get started
Android tv get startedAndroid tv get started
Android tv get started
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android N multi window
Android N multi windowAndroid N multi window
Android N multi window
 
What’s New in iOS 8 SDK ?
What’s New in iOS 8 SDK ?What’s New in iOS 8 SDK ?
What’s New in iOS 8 SDK ?
 

Viewers also liked

Seminar report on Android wear
Seminar report on Android wearSeminar report on Android wear
Seminar report on Android wear
Arushi Gulati
 
Android wear
Android wearAndroid wear
Android wear
Stelian Morariu
 
Android wear
Android wearAndroid wear
Android wear
Mohammed Sonnet Khan
 
Smart watch
Smart watchSmart watch
Smart watchSHEEMA90
 
Smartwatch presentation
Smartwatch presentationSmartwatch presentation
Smartwatch presentation
Connor Hause
 
SMART WATCH REPORT
SMART WATCH REPORTSMART WATCH REPORT
SMART WATCH REPORT
Anusha k
 
Doc2
Doc2Doc2
Doc2
sabyatt
 
Android Wear - Ceci n'est pas une montre ! - #TakeOffTalk
Android Wear - Ceci n'est pas une montre ! - #TakeOffTalkAndroid Wear - Ceci n'est pas une montre ! - #TakeOffTalk
Android Wear - Ceci n'est pas une montre ! - #TakeOffTalk
Damien Cavaillès
 
Android Wear
Android WearAndroid Wear
Android Wear
えき ひでやま
 
Android Lollipop + Android Wear
Android Lollipop + Android WearAndroid Lollipop + Android Wear
Android Lollipop + Android Wear
Nelson Glauber Leal
 
Android Wear
Android WearAndroid Wear
Android Wear
Nelson Glauber Leal
 
Android: a brilliant case for collaborative management of innovation
Android: a brilliant case for collaborative management of innovationAndroid: a brilliant case for collaborative management of innovation
Android: a brilliant case for collaborative management of innovation
Murat @ InnovationTactics.com
 
Solar roadways
Solar roadwaysSolar roadways
Solar roadways
k.vijay kumar
 
solar roadways
solar roadwayssolar roadways
solar roadways
Jaya Chandran
 
Android OS Presentation
Android OS PresentationAndroid OS Presentation
Android OS Presentationhession25819
 
Non technical presentation
Non technical presentationNon technical presentation
Non technical presentationbenriddock
 
Solar Roadways
Solar RoadwaysSolar Roadways
Solar Roadways
Puru Agrawal
 
Android seminar-presentation
Android seminar-presentationAndroid seminar-presentation
Android seminar-presentationconnectshilpa
 
Solar Roadways PPT
Solar Roadways PPTSolar Roadways PPT
Solar Roadways PPT
Seminar Links
 
Library powerpoint
Library powerpointLibrary powerpoint
Library powerpointthemachine99
 

Viewers also liked (20)

Seminar report on Android wear
Seminar report on Android wearSeminar report on Android wear
Seminar report on Android wear
 
Android wear
Android wearAndroid wear
Android wear
 
Android wear
Android wearAndroid wear
Android wear
 
Smart watch
Smart watchSmart watch
Smart watch
 
Smartwatch presentation
Smartwatch presentationSmartwatch presentation
Smartwatch presentation
 
SMART WATCH REPORT
SMART WATCH REPORTSMART WATCH REPORT
SMART WATCH REPORT
 
Doc2
Doc2Doc2
Doc2
 
Android Wear - Ceci n'est pas une montre ! - #TakeOffTalk
Android Wear - Ceci n'est pas une montre ! - #TakeOffTalkAndroid Wear - Ceci n'est pas une montre ! - #TakeOffTalk
Android Wear - Ceci n'est pas une montre ! - #TakeOffTalk
 
Android Wear
Android WearAndroid Wear
Android Wear
 
Android Lollipop + Android Wear
Android Lollipop + Android WearAndroid Lollipop + Android Wear
Android Lollipop + Android Wear
 
Android Wear
Android WearAndroid Wear
Android Wear
 
Android: a brilliant case for collaborative management of innovation
Android: a brilliant case for collaborative management of innovationAndroid: a brilliant case for collaborative management of innovation
Android: a brilliant case for collaborative management of innovation
 
Solar roadways
Solar roadwaysSolar roadways
Solar roadways
 
solar roadways
solar roadwayssolar roadways
solar roadways
 
Android OS Presentation
Android OS PresentationAndroid OS Presentation
Android OS Presentation
 
Non technical presentation
Non technical presentationNon technical presentation
Non technical presentation
 
Solar Roadways
Solar RoadwaysSolar Roadways
Solar Roadways
 
Android seminar-presentation
Android seminar-presentationAndroid seminar-presentation
Android seminar-presentation
 
Solar Roadways PPT
Solar Roadways PPTSolar Roadways PPT
Solar Roadways PPT
 
Library powerpoint
Library powerpointLibrary powerpoint
Library powerpoint
 

Similar to Android Wear Presentation

June 2014 - Android wear
June 2014 - Android wearJune 2014 - Android wear
June 2014 - Android wear
BlrDroid
 
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
Friedger Müffke
 
Getting Ready For Android Wear
Getting Ready For Android WearGetting Ready For Android Wear
Getting Ready For Android Wear
Raveesh Bhalla
 
Cross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-InCross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-In
Peter Friese
 
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
Jesus Gumiel
 
Android 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsAndroid 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture Components
Kai Koenig
 
從 Google i/o 2015 看下半年 mobile 應用發展趨勢
從 Google i/o 2015 看下半年 mobile 應用發展趨勢從 Google i/o 2015 看下半年 mobile 應用發展趨勢
從 Google i/o 2015 看下半年 mobile 應用發展趨勢
Ascii Huang
 
Google admob mediation tutorial
Google admob mediation tutorialGoogle admob mediation tutorial
Google admob mediation tutorial
Rakesh Singh Parihar
 
Google admob mediation tutorial
Google admob mediation tutorialGoogle admob mediation tutorial
Google admob mediation tutorial
Indrajit Paliwal
 
Android Intro
Android IntroAndroid Intro
Android Intro
Justin Grammens
 
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxLecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
NgLQun
 
iOS & Android App Indexing & App Actions
iOS & Android App Indexing & App ActionsiOS & Android App Indexing & App Actions
iOS & Android App Indexing & App Actions
Justin Briggs
 
Android On Your Sleeve - DroidCon Montreal 2015
Android On Your Sleeve - DroidCon Montreal 2015Android On Your Sleeve - DroidCon Montreal 2015
Android On Your Sleeve - DroidCon Montreal 2015
Neal Sanche
 
Google Wear OS watch faces and applications development
Google Wear OS watch faces and applications developmentGoogle Wear OS watch faces and applications development
Google Wear OS watch faces and applications development
Oleksandr Stepanov
 
Google analytics
Google analyticsGoogle analytics
Google analytics
Sean Tsai
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
Junda Ong
 
Londroid meetup
Londroid meetupLondroid meetup
Londroid meetup
Jesus Gumiel
 
Mobile application and Game development
Mobile application and Game developmentMobile application and Game development
Mobile application and Game development
Women In Digital
 
"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
Giuseppe Cerratti
 
Exercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone callExercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone call
maamir farooq
 

Similar to Android Wear Presentation (20)

June 2014 - Android wear
June 2014 - Android wearJune 2014 - Android wear
June 2014 - Android wear
 
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
 
Getting Ready For Android Wear
Getting Ready For Android WearGetting Ready For Android Wear
Getting Ready For Android Wear
 
Cross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-InCross-Platform Authentication with Google+ Sign-In
Cross-Platform Authentication with Google+ Sign-In
 
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
 
Android 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsAndroid 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture Components
 
從 Google i/o 2015 看下半年 mobile 應用發展趨勢
從 Google i/o 2015 看下半年 mobile 應用發展趨勢從 Google i/o 2015 看下半年 mobile 應用發展趨勢
從 Google i/o 2015 看下半年 mobile 應用發展趨勢
 
Google admob mediation tutorial
Google admob mediation tutorialGoogle admob mediation tutorial
Google admob mediation tutorial
 
Google admob mediation tutorial
Google admob mediation tutorialGoogle admob mediation tutorial
Google admob mediation tutorial
 
Android Intro
Android IntroAndroid Intro
Android Intro
 
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxLecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
 
iOS & Android App Indexing & App Actions
iOS & Android App Indexing & App ActionsiOS & Android App Indexing & App Actions
iOS & Android App Indexing & App Actions
 
Android On Your Sleeve - DroidCon Montreal 2015
Android On Your Sleeve - DroidCon Montreal 2015Android On Your Sleeve - DroidCon Montreal 2015
Android On Your Sleeve - DroidCon Montreal 2015
 
Google Wear OS watch faces and applications development
Google Wear OS watch faces and applications developmentGoogle Wear OS watch faces and applications development
Google Wear OS watch faces and applications development
 
Google analytics
Google analyticsGoogle analytics
Google analytics
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
Londroid meetup
Londroid meetupLondroid meetup
Londroid meetup
 
Mobile application and Game development
Mobile application and Game developmentMobile application and Game development
Mobile application and Game development
 
"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
 
Exercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone callExercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone call
 

More from Zi Yong Chua

Getting Started: Google Glass Apps with GDK
Getting Started: Google Glass Apps with GDKGetting Started: Google Glass Apps with GDK
Getting Started: Google Glass Apps with GDK
Zi Yong Chua
 
Getting Discovered on Google Play
Getting Discovered on Google PlayGetting Discovered on Google Play
Getting Discovered on Google Play
Zi Yong Chua
 
Monetizing Android Apps in Asia
Monetizing Android Apps in AsiaMonetizing Android Apps in Asia
Monetizing Android Apps in Asia
Zi Yong Chua
 
Tips for Android Publishing in China
Tips for Android Publishing in ChinaTips for Android Publishing in China
Tips for Android Publishing in China
Zi Yong Chua
 
MoVend Product Intro
MoVend Product IntroMoVend Product Intro
MoVend Product IntroZi Yong Chua
 
AdMob CodeAndroid Presentation
AdMob CodeAndroid PresentationAdMob CodeAndroid Presentation
AdMob CodeAndroid PresentationZi Yong Chua
 
CodeAndroid Meet Up Slides - Augmented Reality on Android
CodeAndroid Meet Up Slides - Augmented Reality on AndroidCodeAndroid Meet Up Slides - Augmented Reality on Android
CodeAndroid Meet Up Slides - Augmented Reality on AndroidZi Yong Chua
 
A Noob’S Guide To Android Application Development
A Noob’S Guide To Android Application DevelopmentA Noob’S Guide To Android Application Development
A Noob’S Guide To Android Application Development
Zi Yong Chua
 

More from Zi Yong Chua (8)

Getting Started: Google Glass Apps with GDK
Getting Started: Google Glass Apps with GDKGetting Started: Google Glass Apps with GDK
Getting Started: Google Glass Apps with GDK
 
Getting Discovered on Google Play
Getting Discovered on Google PlayGetting Discovered on Google Play
Getting Discovered on Google Play
 
Monetizing Android Apps in Asia
Monetizing Android Apps in AsiaMonetizing Android Apps in Asia
Monetizing Android Apps in Asia
 
Tips for Android Publishing in China
Tips for Android Publishing in ChinaTips for Android Publishing in China
Tips for Android Publishing in China
 
MoVend Product Intro
MoVend Product IntroMoVend Product Intro
MoVend Product Intro
 
AdMob CodeAndroid Presentation
AdMob CodeAndroid PresentationAdMob CodeAndroid Presentation
AdMob CodeAndroid Presentation
 
CodeAndroid Meet Up Slides - Augmented Reality on Android
CodeAndroid Meet Up Slides - Augmented Reality on AndroidCodeAndroid Meet Up Slides - Augmented Reality on Android
CodeAndroid Meet Up Slides - Augmented Reality on Android
 
A Noob’S Guide To Android Application Development
A Noob’S Guide To Android Application DevelopmentA Noob’S Guide To Android Application Development
A Noob’S Guide To Android Application Development
 

Recently uploaded

The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 

Recently uploaded (20)

The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 

Android Wear Presentation

  • 1. Introduction to Android Wear Talk by Chua Zi Yong https://plus.google.com/+ZiYongChu a
  • 2. Learn more at www.gdg-sg.org/member • Keep up to date with Google products and technologies • Make new friends that are also passionate about technology • Interact with Googlers • Access to selected exclusive Google events • Find jobs and developers related to Google products • Contribute to developer community
  • 3. Learn more at www.gdg-sg.org/member Because pictures speak a thousand words
  • 4. Learn more at www.gdg-sg.org/member For more membership details, Visit http://bit.ly/gdg-sg-members Get started today with just your email.
  • 5. What is Android Wear? Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 6. What is Android Wear? Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua Notifications Apps on Wear Android Fit
  • 7. What is Android Wear? Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 8. What is Android Wear? Requires Android 4.3 and above Android device Latest Google Play Services and Android Wear app from Google Play installed Internet and connectivity over bluetooth from paired device Limited function when connection is lost Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 9. Getting Started – Install SDK Install the Android Wear SDK Tools from ADT • Android ADT Revision v22.6 and above • Android Wear ARM EABI v7a system image • Update Android Support Library Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 10. Getting Started – Install emulator To install and test Android Wear emulator, you need to (visit http://javapapers.com/android/android-wear-getting-started-tutorial/ Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua for full details) 1) Sign up for developer preview http://developer.android.com/wear/preview/signup.html 2) Create AVD 3) Connect Android device over adb (adb -d forward tcp:5601 tcp:5601) 4) Install Android Wear Preview from Google Play
  • 11. Design for Wear Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua Wear apps should be • Launched automatically • Glance-able • Works like a personal butler • Zero to low interactions
  • 12. Design for Wear Two ways you can think of Wear Interactions • Extension of existing Android app notifications to work better on Android Wear (existing notifications on phone already appears on Wear) Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua • Android Wear specific app
  • 13. Notifications for Wear Extending your existing notifications to Wear • You can add voice input/actions directly from Wear • You can add additional content in pages • By swiping left/right on the wearable • You can stack multiple notifications Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 14. Notifications for Wear Adding actions to Wear (It is very simple) • The same code before works the same on Wear (Including notification actions, big view) • Use NotificationCompat.WearableExtender() for Wearable-only options (Appears only on Wear, not on phone) • You can use addRemoteInput(remoteInput) to prompt user for voice input • P.S. Always use the NotificationManagerCompat instead of NotificationManager (to support 4.1 and above features) Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 15. Notifications for Wear Adding actions to Wear (Eliza sample cNootidficaetio)nCompat.Builder builder = new NotificationCompat.Builder(this) // All the usual stuffs .setContentTitle(getString(R.string.eliza)) .setContentText(mLastResponse) .setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.bg_eliza)) .setSmallIcon(R.drawable.bg_eliza) .setPriority(NotificationCompat.PRIORITY_MIN); Intent intent = new Intent(ACTION_RESPONSE); // Intent to do your stuff Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua PendingIntent pendingIntent = PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_CANCEL_CURRENT); Notification notification = builder .extend(new NotificationCompat.WearableExtender() // New notification extension for Wear .addAction(new NotificationCompat.Action.Builder( R.drawable.ic_full_reply, getString(R.string.reply), pendingIntent) // Get voice input .addRemoteInput(new RemoteInput.Builder(EXTRA_REPLY) .setLabel(getString(R.string.reply)) .build()) .build())) .build(); NotificationManagerCompat.from(this).notify(0, notification);
  • 16. Notifications for Wear Extending your existing notifications to Wear • You can add voice input/actions directly from Wear • You can add additional content in pages • By swiping left/right on the wearable • You can stack multiple notifications Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 17. Notifications for Wear Adding additional content in pages (many at one time) • For example, showing results of nearby search • First, create an array list of notifications • Next, generate a notification for each page you want to display, and add them to your array list • Last, use .addPages(List<Notifications>)to parse in your array list Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 18. Notifications for Wear Adding additional content in pages (one at a time) • First, create the main (first) notification builder • Next, create the new notification you want to insert • Last, use .addPage(Notification) to add your notification Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 19. Notifications for Wear Adding additional content in pages NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) // Main Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua .setSmallIcon(R.drawable.new_message) .setContentTitle("Page 1") .setContentText("Short message") .setContentIntent(viewPendingIntent); Notification secondPageNotification = new NotificationCompat.Builder(this) // Second Notification .build(); Notification twoPageNotification = new WearableExtender() .addPage(secondPageNotification) // Add second notification to main .extend(notificationBuilder) .build(); notificationManager = NotificationManagerCompat.from(this); notificationManager.notify(notificationId, twoPageNotification);
  • 20. Notifications for Wear Extending your existing notifications to Wear • You can add voice input/actions directly from Wear • You can add additional content in pages • By swiping left/right on the wearable • You can stack multiple notifications Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 21. Notifications for Wear Stacking multiple notifications • Use .setGroup(String key) to group your new notification to existing group • Use notify() to send the notification to Wear Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 22. Notifications for Wear Stacking multiple notifications final static String GROUP_KEY_EMAILS = "group_key_emails"; // Key for group ID Notification notif = new NotificationCompat.Builder(mContext) Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua .setContentTitle("New mail from " + sender1) .setContentText(subject1) .setSmallIcon(R.drawable.new_mail); .setGroup(GROUP_KEY_EMAILS) // Set group ID into notification .build(); NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this); notificationManager.notify(notificationId1, notif); // Send out the notification
  • 23. Design for Wear Two ways you can think of Wear Interactions • Extension of existing Android app notifications to work better on Android Wear (existing notifications on phone already appears on Wear) Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua • Android Wear specific app
  • 24. Wear App API Architecture Phone APK Wear APK Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 25. Wear App API Architecture Node API - Inform when Wear is connected Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua Message API - Manage API calls between devices Data API - Centralized data store managed by GPS GPS Magic
  • 26. Wear App API Architecture Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 27. Wear App API Architecture Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 28. Wear App API Architecture Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 29. Wear App API Architecture To start communicating with the Wearable, we need to initialize the GoogleApiClient on the phone APK mGoogleApiClient = new GoogleApiClient.Builder(this) Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua .addApi(Wearable.API) .build(); mGoogleApiClient.connect();
  • 30. Wear App API Architecture WearableListenerService will handle all the callbacks from Google Play Services on wear // Insert the service into the manifest of the Weak.apk, in this case name it // AppListenerService (subclass of Abstract class WearableListenerService) <service android:name=“.AppListenerService”> <intent-filter> Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua <action android:name=“com.google.android.gms.wearable.BIND_LISTENER”/ > </intent-filter> </service>
  • 31. Wear App API Architecture In AppListenerService.java, you can manage the callbacks from Node, Data and Message listeners Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 32. Add Voice Action to Wear You can trigger your app through voice actions Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 33. Add Voice Action to Wear Just add the intent filter to your WearActivitiy Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua <activity android:name=“MyWearActivity”> <intent-filter> <action android:name=“android.intent.action.SEND”/> <category android:name = “com.google.android.voicesearch.SELF_NOTE”/> </intent-filter> </activity>
  • 34. Add Voice Action to Wear Available commands today (approval process similar to Google Glass) More details: https://developer.android.com/training/wearables/apps/voice. html Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 35. Add Voice Action to Wear Alternatively, you can use “Start MyVoiceAction” to launch your app. Just declare in manifest under label. <activity android:name=“MyWearActivity" Android:label=“MyVoiceAction"> Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
  • 36. Add Voice Action to Wear For additional input, say “Take a note”, follow by user voice input, you can get the voice input by calling startActivityForResult // Create an intent that can start the Speech Recognizer activity private void displaySpeechRecognizer() { Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); startActivityForResult(intent, SPEECH_REQUEST_CODE); }
  • 37. What is Android Wear? Code Demo Time Introduction to Android Wear by Chua Zi Yong - https://plus.google.com/+ZiYongChua
  • 38. Learn more at www.gdg-sg.org/member • Keep up to date with Google products and technologies • Make new friends that are also passionate about technology • Interact with Googlers • Access to selected exclusive Google events • Find jobs and developers related to Google products • Contribute to developer community
  • 39. Learn more at www.gdg-sg.org/member Because pictures speak a thousand words
  • 40. Learn more at www.gdg-sg.org/member For more membership details, Visit http://bit.ly/gdg-sg-members Get started today with just your email.

Editor's Notes

  1. Is it possible to run Android Wear only app? I.e. no mobile client, standalone offline app How to manage the notification and icon on the Wear app itself
  2. Is it possible to run Android Wear only app? I.e. no mobile client, standalone offline app How to manage the notification and icon on the Wear app itself
  3. Is it possible to run Android Wear only app? I.e. no mobile client, standalone offline app How to manage the notification and icon on the Wear app itself
  4. Is it possible to run Android Wear only app? I.e. no mobile client, standalone offline app How to manage the notification and icon on the Wear app itself