SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Roma 2014
Google DevFest
No more
pocket watches
Android Wear
Antonino Orlando
Giuseppe Cerratti
e il Team del GDG Roma L-Ab
Roma
DevFest 2014
Antonino Orlando
orlando.antonino@gmail.com
it.linkedin.com/in/orlandoantonino
plus.google.com/+AntoninoOrlando
Giuseppe Cerratti
giuseppe.ciuffo@gmail.com
it.linkedin.com/in/giuseppecerratti
plus.google.com/+GiuseppeCerratti
Roma
DevFest 2014
Android Wear
developer.android.com/wear
“Be glanceable”
Ever had
a date?!
Roma
DevFest 2014
Ring
Riiing!!!
Roma
DevFest 2014
Roma
DevFest 2014
Roma
DevFest 2014
How many time
do you spend
“lost in phone”?
Roma
DevFest 2014
Inspired by Timothy Jordan
“Android wearables provide just the right
information at just the right time, allowing you
to be connected to the virtual world and
present in the real world.”
android.com/wear
Design
Principales
Context
stream
first!
Roma
DevFest 2014
UX
Inspired by Timothy Jordan
Roma
DevFest 2014
UX
developer.android.com
Card!
Roma
DevFest 2014
Great Card
Design
developer.android.com
GDG Chat
Antonino:
See...
Roma
DevFest 2014
Card
Design
Antonino
See you later!
Gone
in five
seconds!
Roma
DevFest 2014
Time required
for each action
is 5 second
Leave
Kimi
alone!
Roma
DevFest 2014
youtube.com/watch?v=sCwILO-AtEs
Debug
Distribution
Roma
DevFest 2014
developer.android.com/training/wearables/
apps/packaging.html
Mobile
App
Wearabl
e
App
Distribute
Manifest.xml
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="it.gdglab.weare.wearaudioplayer">
Roma
DevFest 2014
build.gradle (mobile)
dependencies {
wearApp project(':wear')
compile 'com.google.android.gms:play-services:+'
}
Roma
DevFest 2014
Roma
DevFest 2014
Distribute
{Let’s Code!}
Synced
Notification
Roma
DevFest 2014
MusicServiceClient.java
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
Roma
DevFest 2014
MusicServiceClient.java
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
this.createNotify();
}
Roma
DevFest 2014
createNotify()
public void createNotify(){
int notificationId = 001;
NotificationCompat.Builder notifBuilder =
new NotificationCompat.Builder(getApplicationContext());
notifBuilder.setSmallIcon(R.drawable.ic_launcher);
notifBuilder.setContentTitle("WearMusicPlayer");
notifBuilder.setContentText("It is time to listen");
Roma
DevFest 2014
notifBuilder.addAction(
R.drawable.ic_start, "Start", createIntent("start",
notificationId));
notifBuilder.addAction(
R.drawable.ic_stop, "Stop", createIntent("stop",
notificationId));
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(getApplicationContext());
notificationManager.notify(notificationId, notifBuilder.build());
}
Roma
DevFest 2014
createNotify()
public PendingIntent createIntent(String extra, int notifId){
Intent intent = null;
switch (extra) {
case "start":
intent = new Intent("play")
.setClass(getBaseContext(), NotificationReceiver.class);
break;
Roma
DevFest 2014
MusicServiceClient.java
…
default:
break;
}
PendingIntent pending =
PendingIntent.getBroadcast(getBaseContext(), notifId, intent, 0);
return pending;
}
Roma
DevFest 2014
MusicServiceClient.java
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
// Intent used for starting the MusicService
final Intent musicServiceIntent = new Intent(context,
MusicService.class);
musicServiceIntent.putExtra("command", action);
context.startService(musicServiceIntent);
}
Roma
DevFest 2014
NotificationReceiver.java
Android Wear workshop Roma DevFest 2014

Weitere ähnliche Inhalte

Ähnlich wie Android Wear workshop Roma DevFest 2014

Thibaut rouffineau
Thibaut rouffineauThibaut rouffineau
Thibaut rouffineau
apps4allru
 

Ähnlich wie Android Wear workshop Roma DevFest 2014 (20)

Special Edition: Apple and/vs Google [Infusion - 11th July 2014]
Special Edition: Apple and/vs Google [Infusion - 11th July 2014]Special Edition: Apple and/vs Google [Infusion - 11th July 2014]
Special Edition: Apple and/vs Google [Infusion - 11th July 2014]
 
Developing Android Apps for Google Assistant
Developing Android Apps for Google AssistantDeveloping Android Apps for Google Assistant
Developing Android Apps for Google Assistant
 
Teaching Your Client Android Design, or, Don't Be An iPhoney
Teaching Your Client Android Design, or, Don't Be An iPhoneyTeaching Your Client Android Design, or, Don't Be An iPhoney
Teaching Your Client Android Design, or, Don't Be An iPhoney
 
日本androidの会定例会2016年6月_Android Wear 2.0+関連展示紹介
日本androidの会定例会2016年6月_Android Wear 2.0+関連展示紹介日本androidの会定例会2016年6月_Android Wear 2.0+関連展示紹介
日本androidの会定例会2016年6月_Android Wear 2.0+関連展示紹介
 
Remarkable Matters: Remarkable Mobile Design
Remarkable Matters: Remarkable Mobile DesignRemarkable Matters: Remarkable Mobile Design
Remarkable Matters: Remarkable Mobile Design
 
Droidcon Italy 2020 report
Droidcon Italy 2020 report Droidcon Italy 2020 report
Droidcon Italy 2020 report
 
14 Web tech trends 2014
14 Web tech trends 201414 Web tech trends 2014
14 Web tech trends 2014
 
Doaa-VR-lecture1.pdf
Doaa-VR-lecture1.pdfDoaa-VR-lecture1.pdf
Doaa-VR-lecture1.pdf
 
Android Training Course In Chandigarh
Android Training Course In ChandigarhAndroid Training Course In Chandigarh
Android Training Course In Chandigarh
 
Tools, Frameworks, & Swift for iOS
Tools, Frameworks, & Swift for iOSTools, Frameworks, & Swift for iOS
Tools, Frameworks, & Swift for iOS
 
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution – A past, present and future Mixed Reali...
 
Building for Google Assistant
Building for Google AssistantBuilding for Google Assistant
Building for Google Assistant
 
Coders4Africa Ethiopia Developers & Technopreneurs Conference 2014: Building ...
Coders4Africa Ethiopia Developers & Technopreneurs Conference 2014: Building ...Coders4Africa Ethiopia Developers & Technopreneurs Conference 2014: Building ...
Coders4Africa Ethiopia Developers & Technopreneurs Conference 2014: Building ...
 
The Publisher's Response, Digiday WTF VR, May 11th, 2016
The Publisher's Response, Digiday WTF VR, May 11th, 2016The Publisher's Response, Digiday WTF VR, May 11th, 2016
The Publisher's Response, Digiday WTF VR, May 11th, 2016
 
Android Training in Chandigarh.pdf
Android Training in Chandigarh.pdfAndroid Training in Chandigarh.pdf
Android Training in Chandigarh.pdf
 
Android Training in Chandigarh.pdf
Android Training in Chandigarh.pdfAndroid Training in Chandigarh.pdf
Android Training in Chandigarh.pdf
 
Storytelling using Immersive Technologies
Storytelling using Immersive TechnologiesStorytelling using Immersive Technologies
Storytelling using Immersive Technologies
 
Thibaut rouffineau
Thibaut rouffineauThibaut rouffineau
Thibaut rouffineau
 
Google IO - Five months later
Google IO - Five months laterGoogle IO - Five months later
Google IO - Five months later
 
Designing an App: From Idea to Market
Designing an App: From Idea to MarketDesigning an App: From Idea to Market
Designing an App: From Idea to Market
 

Kürzlich hochgeladen

Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Cara Menggugurkan Kandungan 087776558899
 

Kürzlich hochgeladen (6)

Android Application Components with Implementation & Examples
Android Application Components with Implementation & ExamplesAndroid Application Components with Implementation & Examples
Android Application Components with Implementation & Examples
 
Mobile Application Development-Components and Layouts
Mobile Application Development-Components and LayoutsMobile Application Development-Components and Layouts
Mobile Application Development-Components and Layouts
 
Mobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s ToolsMobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s Tools
 
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
 
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
 
Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312
 

Android Wear workshop Roma DevFest 2014