You Are Here:

Community: Developer Discussion Boards

#1 Old Bluetooth statuspane icon - 2003-08-22, 13:53

Join Date: Mar 2003
Posts: 26
Location: Sweden
antijn
Offline
Registered User
I've used the code mentioned in other posts for connecting to a bluetooth device automatically without user intervention. This works very well except for one case:

When the bluetooth function is deactivated by the user in the connections menu, the bluetooth statuspane icon is removed.

When devices are discovered using the StartNotifierAndGetResponse(), the user gets a prompt to enable bluetooth and the bluetooth statuspane icon is enabled.

However, when using the automatic connection method, the bluetooth channel can be used (I get data) but the statuspane icon is still disabled and the bluetooth connection menu is indicating that bluetooth is turned off.

I need to check the bluetooth "on/off" from the connections menu, and enable the bluetooth statuspane icon, otherwise the user won't get proper feedback.

I would also think it's bad form to fool the user that bluetooth is off, when it is actually active...
Reply With Quote

#2 Old 2003-08-27, 10:20

Join Date: Mar 2003
Posts: 26
Location: Sweden
antijn
Offline
Registered User
I've gotten a solution for my problem:

const TUid KPowerModeSettingNotifierUid = {0x100059E2};


void CBTServiceSearcher::CheckBluetoothL(TRequestStatus& aObserverRequestStatus)
{
TPckgBuf<TBool> pckg;

if( !iIsDeviceSelectorConnected ){
User::LeaveIfError(iDeviceSelector.Connect());
iIsDeviceSelectorConnected = ETrue;
}

iDeviceSelector.StartNotifierAndGetResponse(
aObserverRequestStatus,
KPowerModeSettingNotifierUid,
pckg,
iResponse );
}

When the RunL method gets called next time, the status member contains the information needed. (User enabled bluetooth, user didn't enable bluetooth)
Reply With Quote

#3 Old 2004-10-30, 10:23

Join Date: Feb 2004
Posts: 605
Location: Dallas
Send a message via Yahoo to amitaggarwal
amitaggarwal
Offline
Super Contributor
Hi ,
I m very new to Bluetooth Programming ..
I just want to check whether the bluetooth is enabled or not ??

Accordingly i want to show the statusicon for bluetooth .

Can u just explain your code meaning the mail classes used and also the methods functionality .


Thanks in Advance ..
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia