Thursday, January 22, 2015

HOW TO TURN OFF BLUETOOTH

Description:
In Sym 3rd Edition, Blutooth can be controlled through central repositry(CRepository). KCRUidBluetoothPowerState is the repositry UID to controls bluetooth power state.
header Files
centralrepository.h, btserversdkcrkeys.h
CRepository* cr = CRepository::NewL( KCRUidBluetoothPowerState );
TInt value;
TInt BTerror;
cr->Get( KBTPowerState, value );
if(value==EBTPowerOn)
{
BTerror = cr->Set( KBTPowerState, EBTPowerOff);
}
Note: To verify the bluetooth power changes (implement notifier).

0 comments:

Post a Comment