2014-12-05 104 views
0

我已经在Microsoft Azure网站上运行Google Mirror API的PHP快速入门并可以与Google Glass进行通信。使用Google Glass Mirror API扫描QR码

我定睛一看的选项,如“请求/响应”例如:

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

现在我想知道是否有可能使用谷歌玻璃镜子扫描QR码的API。

这个想法是取代用户必须说控制数字,将控制数字转换为QR码,并让用户扫描QR码,而无需说话。

这可能吗?

回答

1

您无法仅通过使用Mirror API向用户展示QR码扫描屏幕。你也不能添加一个MenuItem,允许用户发回图片。

但是,您可以注册为联系人,并让您的用户与您分享包含QR码的图片。

这不是一个非常流畅的用户体验,但它同时仅采用了镜面API,你可以“扫描” QR代码的唯一途径。

+0

谢谢你的回答。 – 2014-12-05 18:25:23