使用Power State API无法启动蓝牙的问题
文章信息
- 开发伙伴平台:
S60 3rd Edition,
S60 3rd Edition, FP1
- 详细描述
头文件“btserversdkcrkeys.h”中包含了Central Repository keys,可用来控制蓝牙的启动。不过即使将开关状态设置为EBTPowerOn,但仍无法启动蓝牙(虽然可能已有图标标识它被激活)
- 如何重现:
CRepository* cenRep = CRepository::NewLC( KCRUidBluetoothPowerState );
TInt state, err = KErrNone;
cenRep->Get( KBTPowerState, state );
if( state == EBTPowerOff )
{
err = cenRep->Set( KBTPowerState, EBTPowerOn );
}
CleanupStack::PopAndDestroy(); // cenRep
- 解决方案:
使用Bluetooth Notifier API来启动蓝牙


(no comments yet)