我正在尝试将我的 Android 手机作为蓝牙服务器广播,为此,我首先想让 Android“可发现”。
我正在使用 ACTION_REQUEST_DISCOVERABLE 这样做,如下所示: http://developer.android.com/guide/topics/wireless/bluetooth.html#EnablingDiscoverability
testIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
startActivity(testIntent);
不幸的是,这还会在手机上弹出“蓝牙权限请求”对话框。
有没有办法让我的手机“可发现”,而无需提示用户?
谢谢!
最佳答案
尝试在您的应用程序中包含 BLUETOOTH_ADMIN 权限
关于android - 在 Android 上禁用 "Bluetooth Permission Request"确认 - 使用 ACTION_REQUEST_DISCOVERABLE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6669245/