×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    15

    Plug-In for KAccessoryModeChanged API not working.

    Dear All,
    I am using Plug-In for KAccessoryModeChanged. Its compile successfuly. When I run it on N95. Application terminate after calling StartListeningL(KAccessoryModeChanged,sizeof(TDosAccessoryMode),EOnlyLast);
    api> anybody can help me .

    class CDosEventListenerEngine : public CDosEventListenerBase
    {
    public:
    void ConstructL();

    static CDosEventListenerEngine* NewL();

    virtual ~CDosEventListenerEngine(void);

    void Start();

    void AccessoryModeChangedL(TDosAccessoryMode aAccessoryState);

    ///////////////////////////////////////////////////////////////
    void HeadsetButtonChangedL(EPSButtonState) {};
    void OutputVolumeLevelChangedL(int) {};
    void AudioLinkOpenReq() {};
    void AudioLinkCloseReq(unsigned short) {};
    void ActivateVoiceRecognitionReq() {};
    void AbortVoiceRecognitionReq() {};
    void VoiceRecognitionStatusReq() {};
    void QuerySpeedDialNumberReq(int) {};
    void QueryLastDialledVoiceNumberReq() {};
    void AccessoryModeChangedInd(TBTAccessoryMode) {};
    void BTAccessoryModeChangedInd(TBTDeviceType) {};
    void AccessorySpeakerVolumeSetInd(unsigned int) {};
    void ServiceLevelConnEstablishedInd(TBTServiceLevelConnParams) {};
    void HandsfreeModeChanged(EPSHandsFreeMode) {};


    private:
    CDosEventListenerEngine(void);

    private:
    RDosServer iDosSvrSession;
    };

    void CDosEventListenerEngine::ConstructL()
    {
    //Open the dos server session
    Logger::Log( Logger::DEBUG , _L("CDosEventListenerEngine::AccessoryModeChangedL()->Dos Session Begin"));
    iDosSvrSession.Connect();
    Logger::Log( Logger::DEBUG , _L("CDosEventListenerEngine::AccessoryModeChangedL()->Dos Session End"));
    }

    CDosEventListenerEngine* CDosEventListenerEngine::NewL()
    {
    CDosEventListenerEngine* self = new (ELeave)CDosEventListenerEngine();
    self->ConstructL();
    return self;
    }

    void CDosEventListenerEngine::Start()
    {
    Logger::Log( Logger::DEBUG , _L("CDosEventListenerEngine::Start()-> Begin"));
    StartListeningL(KAccessoryModeChanged,sizeof(TDosAccessoryMode),EOnlyLast);
    Logger::Log( Logger::DEBUG , _L("CDosEventListenerEngine::Start()-> End"));
    }

    void CDosEventListenerEngine::AccessoryModeChangedL(TDosAccessoryMode aAccessoryState)
    {
    Logger::Log( Logger::DEBUG , _L("CDosEventListenerEngine::AccessoryModeChangedL()-> Begin"));
    switch(aAccessoryState)
    {
    case EDosAccNotConnected:
    {
    //CEikonEnv::InfoWinL(_L("Accessory Disconnected"),_L(""));
    Logger::Log( Logger::DEBUG , _L("CDosEventListenerEngine::AccessoryModeChangedL()->Accessory Disconnected"));
    break;
    }
    case EDosAccUnsupportedConnected:
    {
    //CEikonEnv::InfoWinL(_L("Unsupported accessory"),_L(""));
    Logger::Log( Logger::DEBUG , _L("CDosEventListenerEngine::AccessoryModeChangedL()->Unsupported accessory"));
    break;
    }
    case EDosAccModeHeadset:
    {
    //CEikonEnv::InfoWinL(_L("Wired Headset detected"),_L(""));
    Logger::Log( Logger::DEBUG , _L("CDosEventListenerEngine::AccessoryModeChangedL()->Wired Headset detected"));
    break;
    }
    };
    }

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Plug-In for KAccessoryModeChanged API not working.

    Try finding what is the panic or leave you are getting.

  3. #3
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Plug-In for KAccessoryModeChanged API not working.

    Also what capabilities you have you may require to put ReadUserData WriteUserData ReadDeviceData WriteDeviceData in you mmp file

  4. #4
    Registered User
    Join Date
    Mar 2008
    Posts
    15

    Re: Plug-In for KAccessoryModeChanged API not working.

    In mmp files capabilities are
    LocalServices NetworkServices ReadUSerData WriteUserData UserEnvironment SwEvent Location ReadDeviceData ProtServ.
    Error code is -46 (KErrPermissionDenied)
    Last edited by naimidrees; 2008-07-09 at 12:35.

  5. #5
    Registered User
    Join Date
    Mar 2008
    Posts
    15

    Re: Plug-In for KAccessoryModeChanged API not working.

    In mmp files capabilities are
    LocalServices NetworkServices ReadUSerData WriteUserData UserEnvironment SwEvent Location ReadDeviceData ProtServ.
    Error code is -46 (KErrPermissionDenied)



    Quote Originally Posted by skumar_rao View Post
    Also what capabilities you have you may require to put ReadUserData WriteUserData ReadDeviceData WriteDeviceData in you mmp file

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: Plug-In for KAccessoryModeChanged API not working.

    Quote Originally Posted by naimidrees View Post
    In mmp files capabilities are
    LocalServices NetworkServices ReadUSerData WriteUserData UserEnvironment SwEvent Location ReadDeviceData ProtServ.
    Error code is -46 (KErrPermissionDenied)
    I haven't used this API but if you open Wiki article, you would find one attached example and it has following capabilities included:
    ReadUserData WriteUserData ReadDeviceData WriteDeviceData
    You may like to see this example application: http://wiki.forum.nokia.com/index.ph...osServExam.zip

    Kiran.
    Nokia Developer Wiki Moderation team

  7. #7
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Plug-In for KAccessoryModeChanged API not working.

    you are missing WriteDeviceData

  8. #8
    Registered User
    Join Date
    Mar 2008
    Posts
    15

    Re: Plug-In for KAccessoryModeChanged API not working.

    Yes ur right. its remove error. But do not receive notification.
    My applicatio is server that running in the background.

    Quote Originally Posted by skumar_rao View Post
    you are missing WriteDeviceData

  9. #9
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Plug-In for KAccessoryModeChanged API not working.

    It does not mater if you application is a GUI application or a server exe. you should be getting notification.

  10. #10
    Registered User
    Join Date
    Mar 2008
    Posts
    15

    Re: Plug-In for KAccessoryModeChanged API not working.

    Dear skumar_rao
    What can I do for this. Bcos its urgent.
    Thak u.

    Quote Originally Posted by skumar_rao View Post
    It does not mater if you application is a GUI application or a server exe. you should be getting notification.

  11. #11
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Plug-In for KAccessoryModeChanged API not working.

    is there any error you are getting from StartListeningL() and Connect(). that may help.

    also make sure that you are using right libs for SDK and device.

  12. #12
    Registered User
    Join Date
    Mar 2008
    Posts
    15

    Plug-In API will not work s60 3rd fp1. Any other methode ?

    Plug-In API will not work s60 3rd fp1.
    http://wiki.forum.nokia.com/index.ph...odeChanged_API
    Any other methode to do this.?

  13. #13
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Plug-In for KAccessoryModeChanged API not working.

    may be have to wait till there is update to the Plug in API.
    Or can't wait till then you have to go for API partnering.

Similar Threads

  1. Is there a C++ API for the video player
    By avbrozhko in forum Symbian
    Replies: 9
    Last Post: 2008-06-06, 14:34
  2. IAP J2ME API
    By melccodobelc in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2008-03-07, 10:58
  3. PIM API not working on 6111, 6103
    By DonnyCU in forum Mobile Java General
    Replies: 1
    Last Post: 2006-08-23, 00:31
  4. SIP API Version 1.0 Example - Cannot get working
    By stlum9495 in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2004-07-20, 07:41
  5. Replies: 0
    Last Post: 2004-03-03, 10:34

Posting Permissions

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