我想让我的新三星 Galaxy S7 (SM-G930F) 在我的 Android 应用程序的蓝牙扫描中始终可以发现。我试过这段代码:
discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 0);
startActivityForResult(discoverableIntent, REQUEST_DISCOVERABLE_CODE);
这适用于我使用的所有设备:
- 带有 CyanogenMod Android 6 的三星 Galaxy S4 mini (GT-I19195);
-Asus Zenfone3 (Z012S) 与 android 7;
-三星 Galaxy S3 (GT-I19300) 与 CyanogenMod Android 6。
你能帮助我吗?