【问题标题】:Use Google Glass Mirror API to scan QR code使用 Google Glass Mirror API 扫描二维码
【发布时间】:2014-12-05 14:38:02
【问题描述】:

我已在 Microsoft 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 来扫描二维码。

这个想法是取代必须说控制数字的用户,将控制数字转换为二维码,让用户无需说话即可扫描二维码。

这可能吗?

【问题讨论】:

    标签: google-glass google-mirror-api


    【解决方案1】:

    您不能仅使用 Mirror API 向用户显示 QR 码扫描屏幕。也不能添加允许用户发回图片的 MenuItem。

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

    这不是一种非常流畅的用户体验,但它是您在仅使用 Mirror API 时“扫描”二维码的唯一方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多