Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/189.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 谷歌眼镜GDK:蓝牙可发现意图_Android_Android Intent_Bluetooth_Google Glass_Google Gdk - Fatal编程技术网

Android 谷歌眼镜GDK:蓝牙可发现意图

Android 谷歌眼镜GDK:蓝牙可发现意图,android,android-intent,bluetooth,google-glass,google-gdk,Android,Android Intent,Bluetooth,Google Glass,Google Gdk,我试图通过蓝牙在我的应用程序中通过调用以下命令来发现我的Google Glass: Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 120); startActivity(discoverableIntent); 但我收到以

我试图通过蓝牙在我的应用程序中通过调用以下命令来发现我的Google Glass:

Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); 
discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 120);
startActivity(discoverableIntent);
但我收到以下错误消息:

无法启动活动 ComponentInfo{com.example.glass/com.example.MainActivity}: android.content.ActivityNotFoundException:未找到要处理的活动 Intent{act=android.bluetooth.adapter.action.REQUEST\u可发现 (有多余的)`}

有人知道谷歌眼镜现在是否支持这一意图吗

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

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

发生该错误是因为Glass没有注册活动来处理显示该操作的UI

如果需要,可以在中提交功能请求吗

同时,您是否在中探索了解决方法,以确定它是否适合您