ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
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

More Related Content

Similar to 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]
AlquimiaWRG
?
Developing Android Apps for Google Assistant
Developing Android Apps for Google AssistantDeveloping Android Apps for Google Assistant
Developing Android Apps for Google Assistant
Kenichi Kambara
?
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
Kenton Price
?
ÈÕ±¾android¤Î»á¶¨Àý»á2016Äê6ÔÂ_Android Wear 2.0£«évßBչʾ½B½é
ÈÕ±¾android¤Î»á¶¨Àý»á2016Äê6ÔÂ_Android Wear 2.0£«évßBչʾ½B½éÈÕ±¾android¤Î»á¶¨Àý»á2016Äê6ÔÂ_Android Wear 2.0£«évßBչʾ½B½é
ÈÕ±¾android¤Î»á¶¨Àý»á2016Äê6ÔÂ_Android Wear 2.0£«évßBչʾ½B½é
Kenichi Kambara
?
Remarkable Matters: Remarkable Mobile Design
Remarkable Matters: Remarkable Mobile DesignRemarkable Matters: Remarkable Mobile Design
Remarkable Matters: Remarkable Mobile Design
Table19
?
Droidcon Italy 2020 report
Droidcon Italy 2020 report Droidcon Italy 2020 report
Droidcon Italy 2020 report
Francesco Ronchi
?
14 Web tech trends 2014
14 Web tech trends 201414 Web tech trends 2014
14 Web tech trends 2014
Fr?jd Interactive
?
Doaa-VR-lecture1.pdf
Doaa-VR-lecture1.pdfDoaa-VR-lecture1.pdf
Doaa-VR-lecture1.pdf
Doaa Mohey Eldin
?
Android Training Course In Chandigarh
Android Training Course In ChandigarhAndroid Training Course In Chandigarh
Android Training Course In Chandigarh
Excellence Academy
?
Seizing the Mixed Reality Revolution ¨C A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution ¨C A past, present and future Mixed Reali...Seizing the Mixed Reality Revolution ¨C A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution ¨C A past, present and future Mixed Reali...
Windows Developer
?
Building for Google Assistant
Building for Google AssistantBuilding for Google Assistant
Building for Google Assistant
Ralph Vincent Regalado
?
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 ...
John Adams
?
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
Digiday
?
Android Training in Chandigarh.pdf
Android Training in Chandigarh.pdfAndroid Training in Chandigarh.pdf
Android Training in Chandigarh.pdf
ExcellenceTechnology9
?
Android Training in Chandigarh.pdf
Android Training in Chandigarh.pdfAndroid Training in Chandigarh.pdf
Android Training in Chandigarh.pdf
ExcellenceTechnology9
?
Storytelling using Immersive Technologies
Storytelling using Immersive TechnologiesStorytelling using Immersive Technologies
Storytelling using Immersive Technologies
Kumar Ahir
?
Thibaut rouffineau
Thibaut rouffineauThibaut rouffineau
Thibaut rouffineau
apps4allru
?
Google IO - Five months later
Google IO - Five months laterGoogle IO - Five months later
Google IO - Five months later
Matteo Bonifazi
?
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
EffectiveUI
?
Designing an Android App: From Idea to Market
Designing an Android App: From Idea to MarketDesigning an Android App: From Idea to Market
Designing an Android App: From Idea to Market
Effective
?
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]
AlquimiaWRG
?
Developing Android Apps for Google Assistant
Developing Android Apps for Google AssistantDeveloping Android Apps for Google Assistant
Developing Android Apps for Google Assistant
Kenichi Kambara
?
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
Kenton Price
?
ÈÕ±¾android¤Î»á¶¨Àý»á2016Äê6ÔÂ_Android Wear 2.0£«évßBչʾ½B½é
ÈÕ±¾android¤Î»á¶¨Àý»á2016Äê6ÔÂ_Android Wear 2.0£«évßBչʾ½B½éÈÕ±¾android¤Î»á¶¨Àý»á2016Äê6ÔÂ_Android Wear 2.0£«évßBչʾ½B½é
ÈÕ±¾android¤Î»á¶¨Àý»á2016Äê6ÔÂ_Android Wear 2.0£«évßBչʾ½B½é
Kenichi Kambara
?
Remarkable Matters: Remarkable Mobile Design
Remarkable Matters: Remarkable Mobile DesignRemarkable Matters: Remarkable Mobile Design
Remarkable Matters: Remarkable Mobile Design
Table19
?
Android Training Course In Chandigarh
Android Training Course In ChandigarhAndroid Training Course In Chandigarh
Android Training Course In Chandigarh
Excellence Academy
?
Seizing the Mixed Reality Revolution ¨C A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution ¨C A past, present and future Mixed Reali...Seizing the Mixed Reality Revolution ¨C A past, present and future Mixed Reali...
Seizing the Mixed Reality Revolution ¨C A past, present and future Mixed Reali...
Windows Developer
?
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 ...
John Adams
?
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
Digiday
?
Storytelling using Immersive Technologies
Storytelling using Immersive TechnologiesStorytelling using Immersive Technologies
Storytelling using Immersive Technologies
Kumar Ahir
?
Thibaut rouffineau
Thibaut rouffineauThibaut rouffineau
Thibaut rouffineau
apps4allru
?
Google IO - Five months later
Google IO - Five months laterGoogle IO - Five months later
Google IO - Five months later
Matteo Bonifazi
?
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
EffectiveUI
?
Designing an Android App: From Idea to Market
Designing an Android App: From Idea to MarketDesigning an Android App: From Idea to Market
Designing an Android App: From Idea to Market
Effective
?

Android Wear workshop Roma DevFest 2014