Google Glass Development

Google Glass Development

Fe087c5a0e898cd95c67973aa97f2067?s=128

David Vávra

May 23, 2014
Tweet

Transcript

  1. David Vávra, Inmite Development for using Android GDK

  2. None
  3. None
  4. None
  5. None
  6. None
  7. None
  8. None
  9. None
  10. None
  11. None
  12. None
  13. None
  14. Hardware

  15. Demo time

  16. 4 principles of Glassware design

  17. Design for Glass

  18. Don’t get in the way

  19. Keep it relevant

  20. Avoid the unexpected

  21. User interface: Timeline card • 640x360 px • black background,

    given font sizes & colors • bundles
  22. User interface - timeline

  23. Immersions

  24. Menus

  25. None
  26. GDK • Full API level 19 • no touch •

    resolution 640x360 • no emulator • same API for Speech, Camera, Navigation, Browser, Location, Sensors
  27. None
  28. <style name="CustomTheme" parent= "@android:style/Theme.DeviceDefault" /> android { compileSdkVersion "Google Inc.:Glass

    Development Kit Preview:19" …}
  29. Card card1 = new Card(context); card1.setText("This card has a footer.");

    card1.setFootnote("I'm the footer!"); View card1View = card1.getView();
  30. 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
  31. None
  32. 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); } }
  33. Live card

  34. 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
  35. Updating live cards mRemoteViews.setTextViewText(R.id.text, "new message"); mLiveCard.setViews(mRemoteViews); Removing live cards

    mLiveCard.unpublish();
  36. Let’s dive into Glasquare code http://github.com/destil/glasquare

  37. Distribution • adb install • MyGlass ◦ checklist: https://developers.google.com/glass/distribute/checklist ◦

    design ◦ voice commands ◦ assets
  38. None
  39. Documentation • https://developers.google.com/glass • https://github.com/googleglass • http://stackoverflow. com/questions/tagged/google-gdk • https://code.google.com/p/google-glass-

    api/issues/list
  40. Q + A Follow me: http://google.com/+DavidVávra http://twitter.com/destil