[android-developers] Re: How to detect when bluetooth is turned on by user?

2010-12-25 Thread martien huijsmans
Txs for the suggestion. I implemented a BroadcastReceiver that listens for state changes BluetoothAdapter.STATE_TURNING_OFF and BluetoothAdapter.STATE_ON and stop or starts my Bluetooth service. Everything works. On Dec 24, 11:38 am, Indicator Veritatis mej1...@yahoo.com wrote: Please

[android-developers] Re: How to detect when bluetooth is turned on by user?

2010-12-24 Thread Indicator Veritatis
Please read http://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html and notice that getDefaultAdapter() returns a real Adapter only if Bluetooth support exists. If Bluetooth support exists, but is turned off, then getState() returns STATE_OFF. At least that is the way it