SlideShare a Scribd company logo
1 of 40
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 CS5Chris Griffith
 
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 CS5Chris Griffith
 
Android workshop - 02. Glass development 101
Android workshop - 02. Glass development 101Android workshop - 02. Glass development 101
Android workshop - 02. Glass development 101Johnny Sung
 
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
 
Making Money with Adobe AIR
Making Money with Adobe AIRMaking Money with Adobe AIR
Making Money with Adobe AIRAlmog Koren
 
Android Wearable App Development - 1
Android Wearable App Development - 1Android Wearable App Development - 1
Android Wearable App Development - 1Ketan 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 streamingMatteo 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.5Chris Griffith
 
Google Glass, the GDK, and HTML5
Google Glass, the GDK, and HTML5Google Glass, the GDK, and HTML5
Google Glass, the GDK, and HTML5Oswald 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 AndroidSittiphol 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 AppsCodrina Merigo
 
Google Glasses Integration with SAP
Google Glasses Integration with SAPGoogle Glasses Integration with SAP
Google Glasses Integration with SAPGh14Cc10
 
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 LibraryJoe Birch
 
Android tv get started
Android tv get startedAndroid tv get started
Android tv get startedAscii Huang
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialAbid Khan
 
Android N multi window
Android N multi windowAndroid N multi window
Android N multi windowYu-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

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 wearBlrDroid
 
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
 
Getting Ready For Android Wear
Getting Ready For Android WearGetting Ready For Android Wear
Getting Ready For Android WearRaveesh 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-InPeter 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 2016Jesus Gumiel
 
Android 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsAndroid 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsKai 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 tutorialIndrajit Paliwal
 
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.pptxNgLQun
 
iOS & Android App Indexing & App Actions
iOS & Android App Indexing & App ActionsiOS & Android App Indexing & App Actions
iOS & Android App Indexing & App ActionsJustin 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 2015Neal 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 developmentOleksandr Stepanov
 
Google analytics
Google analyticsGoogle analytics
Google analyticsSean Tsai
 
Android Workshop
Android WorkshopAndroid Workshop
Android WorkshopJunda Ong
 
Mobile application and Game development
Mobile application and Game developmentMobile application and Game development
Mobile application and Game developmentWomen 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'AquilaGiuseppe Cerratti
 
Exercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone callExercises broadcast receiver,incoming phone call
Exercises broadcast receiver,incoming phone callmaamir 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 GDKZi Yong Chua
 
Getting Discovered on Google Play
Getting Discovered on Google PlayGetting Discovered on Google Play
Getting Discovered on Google PlayZi Yong Chua
 
Monetizing Android Apps in Asia
Monetizing Android Apps in AsiaMonetizing Android Apps in Asia
Monetizing Android Apps in AsiaZi Yong Chua
 
Tips for Android Publishing in China
Tips for Android Publishing in ChinaTips for Android Publishing in China
Tips for Android Publishing in ChinaZi 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 DevelopmentZi 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

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

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