An introduction to the development of software applications for Google Glass (Glassware) using the preview version of the Glass Development Kit extension to Android. To illustrate the GDK, we have created a sample application, called Breaking Glass, based on the awesome TV series Breaking Bad
Video of the presentation: https://www.youtube.com/watch?v=pV2_HjZk1W0
Code available on: https://github.com/everywaretech/BreakingGlass
12. Live Cards
Currently cooking for 1683 peopleOk Glass, find a recipe
Breaking
Service
Service
High-frequency rendering
13. Live Cards
Currently cooking for 1683 peopleOk Glass, find a recipe
Breaking
Service
Service <service
android:name="es.everywaretech.breakingglass.BreakingService"
android:label="@string/app_name"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name=“com.google.android.glass.action.
VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="@xml/voice_trigger_start" />
</service>
Android Manifest
High-frequency rendering
14. Live Cards
Currently cooking for 1683 peopleOk Glass, find a recipe
Breaking
Service
Service <service
android:name="es.everywaretech.breakingglass.BreakingService"
android:label="@string/app_name"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name=“com.google.android.glass.action.
VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="@xml/voice_trigger_start" />
</service>
Android Manifest
<trigger command="FIND_A_RECIPE" />
xml/voice_trigger_start.xml
High-frequency rendering
15. Currently cooking for 1683 people
Breaking
Service
Service
Live Cards
Ok Glass, find a recipe
High-frequency rendering
16. Currently cooking for 1683 people
Breaking
Service
Service
Live
Card
Live Card
Live Cards
Ok Glass, find a recipe
High-frequency rendering
17. Currently cooking for 1683 people
Breaking
Service
Service
Breaking
Drawer
Direct Rendering
Callback
Live
Card
Live Card
Live Cards
Ok Glass, find a recipe
High-frequency rendering
18. Currently cooking for 1683 people
Breaking
Service
Service
Breaking
Drawer
Direct Rendering
Callback
Breaking
View
View
Live
Card
Live Card
Live Cards
Ok Glass, find a recipe
High-frequency rendering
19. Currently cooking for 1683 people
Breaking
Service
Service
Breaking
Drawer
Direct Rendering
Callback
Breaking
View
View
Breaking
Activity
Activity
action
Live
Card
Live Card
Live Cards
Ok Glass, find a recipe
High-frequency rendering
33. Static Cards
adapter = new RecipeAdapter(createCards(this));
scrollView = new CardScrollView(this);
scrollView.setAdapter(adapter);
scrollView.activate();
setContentView(scrollView);
setCardScrollerListener();
RecipeActivity.onCreate()
34. Static Cards
adapter = new RecipeAdapter(createCards(this));
scrollView = new CardScrollView(this);
scrollView.setAdapter(adapter);
scrollView.activate();
setContentView(scrollView);
setCardScrollerListener();
RecipeActivity.onCreate()
Card c = new Card(context);
c.setImageLayout(Card.ImageLayout.FULL);
c.setText("Your blue meth-candy is ready");
c.setFootnote("Tap to start selling it");
c.addImage(R.drawable.s09);
RecipeActivity.createCards()
46. Live CardsLow-frequency rendering
// Get an instance of a live card
liveCard = new LiveCard(this, LIVE_CARD_TAG);
!
// Inflate a layout into a remote view
liveCardView = new RemoteViews(getPackageName(), R.layout.selling_view);
!
// Publish the live card
liveCard.publish(PublishMode.REVEAL);
!
// Queue the update text runnable
handler.post(mUpdateLiveCardRunnable);