Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
重複の可能性: AndroidでBluetoothをプログラムで有効/無効にする方法
こんにちは、プログラムで Bluetooth をオンにする必要があるアプリケーションを開発しています。
このコードは私にとってはうまくいきます。これを試すことができます
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); if (!mBluetoothAdapter.isEnabled()) { //Play with bluetooth }else{ mBluetoothAdapter.disable(); }