【发布时间】: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