×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    26

    Bluetooth statuspane icon

    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...

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    26
    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)

  3. #3
    Super Contributor
    Join Date
    Feb 2004
    Location
    Dallas
    Posts
    605
    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 ..

Posting Permissions

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