Writing Mirror API and Native Apps for Google Glass
1. Writing Mirror API &
Native Applications for
Jean-Luc David
jldavid@gmail.com
jldavid.com
@jldavid
2. Who am I?
- Freelance wearables developer
- Wrote 5 books for Wiley Publishing
- Worked at Yellow Pages Group,
Microsoft, Digiflare Inc.
- I love hackathons
Everyone in this room will
get to try out
!
3. What is Google Glass?
- Galaxy Nexus - Android 4.0.4, dual-core
- Battery ≤ 1 day
- 5MPX camera, 720p video, touchpad
- Display 640x360px (= 25' HD screen 2m)
- Gyroscope, accelerometer, compass
- Wifi, BT, GPS
- 16 GB, 682 RAM
- Sound “bone conduction”
- Microphone, eye tracker
- Calls/sms/gps/internet through phone

4. Why Wearables?
Source: Everett Rogers - Diffusion of Evolution
27. Cards
<?php
// Add includes & OAuth Check
!
// Set up client
$client = get_google_api_client();
$bundleVer = 15;
$mirror_service = new Google_MirrorService($client);
!
$new_timeline_item = new Google_TimelineItem();
$new_timeline_item->setHTML("<article class='photo'><img
style='width:100%; height:100%;' src='http://stereo.com/
splash.png'></article>");
$new_timeline_item->setBundleId($bundleVer);
$new_timeline_item->setIsBundleCover(false);
$notification = new Google_NotificationConfig();
$notification->setLevel("DEFAULT");
$new_timeline_item->setNotification($notification);
28. Cards
// A custom menu item
$menu_items = array();
$custom_menu_item = new Google_MenuItem();
$custom_menu_value = new Google_MenuValue();
$custom_menu_value->setDisplayName("Drill Into");
$custom_menu_value->setIconUrl($service_base_url."/static/images/
drill.png");
$custom_menu_item->setValues(array($custom_menu_value));
$custom_menu_item->setAction("REPLY");
!
// This is how you identify it on the notification ping
$custom_menu_item->setId("safe-for-later");
array_push($menu_items, $custom_menu_item);
$new_timeline_item->setMenuItems($menu_items);
!
insert_timeline_item($mirror_service, $new_timeline_item, null,
null);
?>
35. How can I get my own pair?
- Be U.S. residents
- Be at least 18 years old
- Purchase Glass for $1,500 + tax within the US
- Provide a US shipping address or pick up their
Glass at one of our locations in New York, San
Francisco or Los Angeles