Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 09:44, 8 December 2007.

Turn Bluetooth On

From Forum Nokia Wiki

Useful code, let's try it. I have already try this code in Symbian 1st and 2nd Edition but not Symbian 3rd Edition.

#include <e32std.h>
 
#define KPowerModeSettingNotifierUid 0x100059E2
 
void TurnBluetoothOnL() {
	TPckgBuf<TBool> pckg;
	RNotifier iNotifier;
	TPckgBuf<TBool> iNotifierResult;
	TRequestStatus status;
 
	User::LeaveIfError(iNotifier.Connect());
	iNotifier.StartNotifierAndGetResponse(status, KPowerModeSettingNotifierUid, pckg, iNotifierResult);
	User::WaitForRequest(status);
	User::LeaveIfError(status.Int());
 
	iNotifier.CancelNotifier(KPowerModeSettingNotifierUid);
	iNotifier.Close();
	User::LeaveIfError(iNotifierResult[0]);
}
 
void MainMethod() {
	TRAPD(err, TurnBluetoothOnL());
	if (err != KErrNone)
	{
		// Handle Error Here
	}
	// Bluetooth is already on
}
Related Discussions
Thread Thread Starter Forum Replies Last Post
How to turn off the flash in N73 during snapshot? blisspark Mobile Java Media (Graphics & Sounds) 3 2007-09-24 15:47
line length in ListBox? samweb General Symbian C++ 10 2004-08-28 19:21
Connection Nokia 6120 to PDA asenka111 Bluetooth Technology 2 2008-01-29 16:50
background light control problem miqitangguo Symbian User Interface 4 2008-05-06 13:15
Pilot modeal maxkiva General Symbian C++ 0 2005-05-18 07:54
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZbluetoothQ
     qfnZtopicQUqfnTopicZseriesE5f60Q
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX