×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Registered User
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048

    HandleSessionEventL not being called

    Hi all,

    I have implemented an example from wiki to receive incoming SMS by listening to the inbox.

    http://wiki.forum.nokia.com/index.ph...g_SMS_messages

    I compiled the code added all libs and needed capabilities, signed it OPEN SIGNED ONLINE. After opening the messaging server session HandleSessionEventL() is not being called. I dont know why i debugged it , session is connected but OS is not calling this function if the message is coming or not. After connecting to server session code is not working. Can anyone tell me what can be the problem using S60 3rd edition SDK and testing it on N73.

    Regards,
    Sumit

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: HandleSessionEventL not being called

    Regards,
    Shafali

  3. #3
    Registered User
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048

    Re: HandleSessionEventL not being called

    Hi,

    After opening the session to messaging server in ConstructL(). I also added the line
    iSession->SetReceiveEntryEvents(ETrue);
    But the problem is same HandleSessionEventL() is not being called. I am not getting notification of any messaging server event.Do anyone have idea what can be the issue?

    regards,
    Sumit

  4. #4
    Regular Contributor
    Join Date
    May 2006
    Posts
    79

    Re: HandleSessionEventL not being called

    Hi,

    I too face the same prop.
    I couldnt find the solution.
    So, i used the RSocket to listen the Incoming SMS.

    You could try this

    http://wiki.forum.nokia.com/index.php/SMS_Utilities_API

    cheers

  5. #5
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: HandleSessionEventL not being called

    Quote Originally Posted by sumit.rathi View Post
    Hi,

    After opening the session to messaging server in ConstructL(). I also added the line
    iSession->SetReceiveEntryEvents(ETrue);
    But the problem is same HandleSessionEventL() is not being called. I am not getting notification of any messaging server event.Do anyone have idea what can be the issue?

    regards,
    Sumit
    Have you added the CActiveScheduler::Add(this), in cunstructL.
    or set CMsvSession::OpenAsyncL(*this);
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

  6. #6
    Registered User
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048

    Re: HandleSessionEventL not being called

    Quote Originally Posted by bkarthik_be View Post
    Hi,

    I too face the same prop.
    I couldnt find the solution.
    So, i used the RSocket to listen the Incoming SMS.

    You could try this

    http://wiki.forum.nokia.com/index.php/SMS_Utilities_API

    cheers
    First of all i want the solution/reason why HandleSessionEventL is not being called.
    And i think using RSocket you can listen messages with a particular string format or there are some other match patterns but you can't extract the sender's number.
    As i want sender's no. so it is not possible with RSocket because i want to read messages from a particular number. Lets try may be we would find any solution.

  7. #7
    Regular Contributor
    Join Date
    May 2006
    Posts
    79

    Re: HandleSessionEventL not being called

    Hi,

    Even using RSocket you can get the senders' information,

    Check the link.

    The HandleSessionEventL() works fine for me only outgoing message not an incoming msgs that the reason why i suggested the RSocket way.

    For incoming the event EMsvEnteriesChanged Never called, i've checked all other events while receiving the incoming message , i couldnt get the events properly.

  8. #8
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: HandleSessionEventL not being called

    Quote Originally Posted by bkarthik_be View Post
    Hi,

    Even using RSocket you can get the senders' information,

    Check the link.

    The HandleSessionEventL() works fine for me only outgoing message not an incoming msgs that the reason why i suggested the RSocket way.

    For incoming the event EMsvEnteriesChanged Never called, i've checked all other events while receiving the incoming message , i couldnt get the events properly.
    How can you say, i implemented the incoming message listener through HandleSessionEventL() and it works for me both outgoing and incoming message.
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

  9. #9
    Regular Contributor
    Join Date
    May 2006
    Posts
    79

    Re: HandleSessionEventL not being called

    Hi Amit,

    The HandleSessionEventL() is not working for me to delete the Incoming msg for me i followed the following code to delete the msg but i couldnt achieve so i moved into RSocket way.

    case EMsvEntriesChanged:
    {
    // Look for changes. When using the emulator
    // observed folder is drafts, otherwise inbox
    if (aArg2 && *(static_cast<TMsvId*>(aArg2)) == KObservedFolderId)
    {
    LOG(EError,_L8("IO Message Received"));
    CMsvEntrySelection* entries =
    static_cast<CMsvEntrySelection*>(aArg1);
    if(!entries && entries->Count() < 1 )
    {
    return;
    }
    else if (iNewMessageId == entries->At(0))
    {
    if( !iMsvEntry )
    return;

    // Set entry context to the new message
    iMsvEntry->SetEntryL(iNewMessageId);

    // Check the type of the arrived message and
    // that the message is complete
    // Only SMS's are our consern
    if (iMsvEntry->Entry().iMtm != KUidMsgTypeSMS ||
    !iMsvEntry->Entry().Complete())
    return;

    // Delete message from this Inbox-folder
    iMsvEntry->DeleteL(iMsvEntry->EntryId());
    }
    }
    break;

  10. #10
    Registered User
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048

    Re: HandleSessionEventL not being called

    Quote Originally Posted by aamitgupta View Post
    Have you added the CActiveScheduler::Add(this), in cunstructL.
    or set CMsvSession::OpenAsyncL(*this);
    Hi amit,

    First of all i have not implemented an active object i am just using MMsvSessionObserver for the call back functions. So there is no need of adding my object to active scheduler. Second,
    I also have opened the CMsvSession asynchronously already as you can see my first post i have mentioned the link also which i have implemented.

    Regards,
    Sumit

  11. #11
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: HandleSessionEventL not being called

    Hi,

    I have never faced such problems of HandleSessionEventL never called, provided if you implement the sms observer properly.
    If you need any reference snippets let us know..
    But HandleSessionEventL works properly if you implement it properly.

    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  12. #12
    Registered User
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048

    Re: HandleSessionEventL not being called

    Quote Originally Posted by mateen_maldar View Post
    Hi,

    I have never faced such problems of HandleSessionEventL never called, provided if you implement the sms observer properly.
    If you need any reference snippets let us know..
    But HandleSessionEventL works properly if you implement it properly.

    Regards,
    Mateen Maldar
    As i have mentioned already i am using this code from wiki
    http://wiki.forum.nokia.com/index.ph...g_SMS_messages
    I have implemented it as it is written here. But i am nt getting any event in HandleSessionEventL(). Should i do something extra except this code???

    Regards,
    Sumit

  13. #13
    Regular Contributor
    Join Date
    Nov 2005
    Posts
    131

    Re: HandleSessionEventL not being called

    What if you try to use CMsvSession::OpenSyncL() instead of CMsvSession::OpenAsyncL()?

  14. #14
    Registered User
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048

    Re: HandleSessionEventL not being called

    Quote Originally Posted by beltry View Post
    What if you try to use CMsvSession::OpenSyncL() instead of CMsvSession::OpenAsyncL()?
    Same is happening in both cases. My compiler never made any log file in HandleSessionEventL(). I never got any event. I am not able to understand why it is happening.

  15. #15
    Regular Contributor
    Join Date
    Nov 2005
    Posts
    131

    Re: HandleSessionEventL not being called

    Why don't you share some of your code?
    Said like, at this point, this doesn't lead to anywhere...

Similar Threads

  1. MaiscOpenComplete function Not getting called
    By tlgkumar in forum Symbian
    Replies: 4
    Last Post: 2009-01-08, 05:59
  2. exe - destructor not being called
    By nubiah in forum Symbian
    Replies: 4
    Last Post: 2007-07-27, 10:25
  3. ActiveObject RunL is called just once
    By lskmao in forum Symbian
    Replies: 3
    Last Post: 2007-01-18, 15:15
  4. Errors building project in VS.2003
    By jensesaat in forum Symbian
    Replies: 11
    Last Post: 2006-11-13, 16:54

Posting Permissions

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