Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Google Glass Development

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

Google Glass Development

Avatar for David Vávra

David Vávra

May 23, 2014
Tweet

More Decks by David Vávra

Other Decks in Technology

Transcript

  1. GDK • Full API level 19 • no touch •

    resolution 640x360 • no emulator • same API for Speech, Camera, Navigation, Browser, Location, Sensors
  2. Card card1 = new Card(context); card1.setText("This card has a footer.");

    card1.setFootnote("I'm the footer!"); View card1View = card1.getView();
  3. res/xml/my_voice_trigger.xml <?xml version="1.0" encoding="utf-8"?> <trigger keyword="start my app" /> <uses-permission

    android:name="com.google.android.glass.permission. DEVELOPMENT"/> <activity | service ...> <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/my_voice_trigger" /> </activity | service> AndroidManifest.xml
  4. Menu The same onCreateOptionsMenu from Android SDK public class MainActivity

    extends Activity { // ... @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { openOptionsMenu(); return true; } return super.onKeyDown(keyCode, event); } }
  5. Creating live cards TimelineManager tm = TimelineManager.from(context); mLiveCard = tm.createLiveCard(LIVE_CARD_TAG);

    mLiveCard.setViews(new RemoteViews(context.getPackageName(), R.layout.card_text)); mLiveCard.publish(LiveCard.PublishMode.REVEAL); // or SILENT