我在Google Azure网站上启动了Google Mirror API的PHP快速入门,并可以与Google Glass进行通信。
我仔细研究了诸如"请求/响应"等选项。例如:
case 'insertItemWithAction':
$new_timeline_item = new Google_TimelineItem();
$new_timeline_item->setText("What did you have for lunch?");
$notification = new Google_NotificationConfig();
$notification->setLevel("DEFAULT");
$new_timeline_item->setNotification($notification);
$menu_items = array();
// A couple of built in menu items
$menu_item = new Google_MenuItem();
$menu_item->setAction("REPLY");
array_push($menu_items, $menu_item);
$menu_item = new Google_MenuItem();
$menu_item->setAction("READ_ALOUD");
array_push($menu_items, $menu_item);
$new_timeline_item->setSpeakableText("What did you eat? Bacon?");
$menu_item = new Google_MenuItem();
$menu_item->setAction("SHARE");
array_push($menu_items, $menu_item);
(来自https://github.com/googleglass/mirror-quickstart-php/blob/master/index.php)
我现在想知道是否可以使用Google Glass Mirror API扫描QR码。
这个想法是取代不得不说控制数字的用户,将控制数字转换为QR码并让用户扫描QR码而不必说话。
这可能吗?
答案 0 :(得分:1)
仅使用Mirror API无法向用户显示QR码扫描屏幕。你也不能添加一个MenuItem,允许用户发回图片。
但是,您可以注册为联系人,让您的用户与您分享包含QR码的图片。
这不是一个非常流畅的用户体验,但它是您扫描"的唯一方式。只使用镜像API的QR码。