This page was last modified 14:22, 29 June 2007.
Check Bluetooth On or Off
From Forum Nokia Wiki
This code uses for check that Bluetooth On or Off by test availability of Bluetooth.
TBool GetBluetoothOn() // BTONOFF { // Create and initialise an RHostResolver RHostResolver hr; TInt res = false; TBool ret; RSocketServ socketServer; User::LeaveIfError(socketServer.Connect()); CleanupClosePushL(socketServer); res = hr.Open(socketServer, KBTAddrFamily, BTLinkManager); if (KErrNone != res) { // if not success, this means bluetooth is not on ret = EFalse; } else { ret = ETrue; // Bluetooth is already ON hr.Close(); } CleanupStack::PopAndDestroy(1); return ret; }
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Connect a logietch IO2 pen with bluetooth | FrAim | Bluetooth Technology | 1 | 2007-03-30 19:01 |
| Unable to perform bluetooth operation on Nokia 6260 | bidur05@hotmail.com | Bluetooth Technology | 1 | 2006-07-04 19:55 |
| I cannot get Bluetooth Protocol Stack | esamurai | Mobile Java Networking & Messaging & Security | 6 | 2008-02-15 09:09 |
| compatibility issue | teura666 | Bluetooth Technology | 1 | 2005-09-15 14:43 |
| bluetooth p2p linking | qwertyw | Mobile Java Networking & Messaging & Security | 1 | 2007-05-20 20:28 |
