2014-12-05 123 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