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