【问题标题】:Google Glass GDK: Bluetooth discoverable IntentGoogle Glass GDK:蓝牙可发现 Intent
【发布时间】:2014-04-02 19:02:36
【问题描述】:

我尝试通过调用流动意图使我的 Google Glass 在我的应用中通过蓝牙被发现:

Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); 
discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 120);
startActivity(discoverableIntent);

但我收到以下错误消息:

无法开始活动 组件信息{com.example.glass/com.example.MainActivity}: android.content.ActivityNotFoundException:找不到要处理的活动 意图 { act=android.bluetooth.adapter.action.REQUEST_DISCOVERABLE (有额外的)`}

有谁知道谷歌眼镜现在是否支持这种意图?

当然,我确保我在我的清单文件中设置了权限:

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

【问题讨论】:

    标签: android android-intent bluetooth google-glass google-gdk


    【解决方案1】:

    发生该错误是因为 Glass 没有注册一个 Activity 来处理显示该操作的 UI。

    如果需要,可以在our issue tracker 提出功能请求吗?

    与此同时,您是否探索过this post/answer 中的解决方法,看看它是否适合您?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-16
      • 1970-01-01
      • 2013-12-28
      • 1970-01-01
      • 2014-06-06
      相关资源
      最近更新 更多