Namespaces
Variants
Actions
Revision as of 10:48, 20 July 2012 by hamishwillee (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Check Bluetooth power on/off in Symbian 2nd edition phones

Jump to: navigation, search
Article Metadata

Article
Created: giridharn (21 May 2007)
Last edited: hamishwillee (20 Jul 2012)

To Check Bluetooth Power On or Off

Headers required:

#include <SettingInfo.h>  // CSettingInfo

Library 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();


Related Links


103 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved