Check Bluetooth power on/off in Symbian 2nd edition phones
Article Metadata
To Check Bluetooth Power On or Off
Headers required:
#include <SettingInfo.h> // CSettingInfoLibrary required:
LIBRARY PlatformEnv.lib //CSettingInfo
Source file:
// Using class should derive MSettingInfoObserver.
// and declare void HandleNotificationL(
// SettingInfo::TSettingID aID, const TDesC &aNewValue);
//iSettingInfo is of type CSettingInfo*
iSettingInfo = CSettingInfo::NewL( this );
TInt btMode = -1;
TInt err = iSettingInfo->Get( SettingInfo::EBluetoothPowerMode, btMode );
TBuf<30> errBuf;
errBuf.Num(btMode);
iEikonEnv->AlertWin(errBuf);
// EBluetoothPowerMode : Current bluetooth power mode.
// Integer value. Possible values
// 0 (unpowered/sleeping)
// 1 (powered up and fully functional)
//Order notifications when bluetooth power mode is changed
err = iSettingInfo.NotifyChanges( SettingInfo::EBluetoothPowerMode );
//Changed states can be get from HandleNotificationL();


tote_b5 23:31, 21 May 2007 (UTC) I think it would really make sense to merge this article with How to set Bluetooth power state. Other than that, did you check it out if your code compiles in public SDK as well? For example, I could not find CSettingInfo class in 3rd Edition MR.