×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    how to Scan and get inbox's unread message?

    hi

    i Application's work is start process when phone is start without any gui.

    so how i can scan and get count or indox's new and unread messages. and it's Possible to get messages before going to inbox. and how to directly send message after read message.

    please help me of above question

    Tanya

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: how to Scan and get inbox's unread message?

    Have you already checked Wiki for example codes, there are couple of nice examples readily available in there for reading inbox, as well as monitoring changes in messaging folders.

    yucca

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    2

    Re: how to Scan and get inbox's unread message?

    Can you please point me to those in wiki, which can help me in scanning the unread messages in Message Inbox?

    Thanks
    Varad

  4. #4
    Regular Contributor
    Join Date
    May 2004
    Location
    Bangalore, India
    Posts
    118

    Re: how to Scan and get inbox's unread message?

    Hi Varadas,

    Can you look for S60_Platform_SMS_Example_v2_0_en.zip on this forum?

    Tanya,

    As fas as gettting messages before it goes to inbox is concerned, you can do it by listening toa socket, something like this ...
    mRSocket.Open(mRSocketServer, KSMSAddrFamily, KSockDatagram, KSMSDatagramProtocol)

    Once you opent the socket, you can specify the match pattern if you want to filter out the incoming messages.

    TSmsAddr smsAddr;
    smsAddr.SetSmsAddrFamily(ESmsAddrMatchText);
    smsAddr.SetTextMatch(KGdpSmsHeaderTag());
    User::LeaveIfError(mRSocket.Bind(smsAddr));


    Once you receive the message, your RunL will be called and you can read the incoming message as follows...
    CSmsBuffer* buffer=NULL;
    buffer=CSmsBuffer::NewL();
    CSmsMessage *iSmsMsg = CSmsMessage::NewL(mRFs, CSmsPDU::ESmsSubmit, buffer);

    // Read the message.
    RSmsSocketReadStream readstream(mRSocket);
    readstream >> *(iSmsMsg);

    After reading the message, you can either let it go to inbox or you can remove the message from message store so that it doesnot goes to inbox.

    // Let the socket know that we have read the message and it can be removed from the message
    // store.
    mRSocket.Ioctl(KIoctlReadMessageSucceeded, iStatus, NULL, KSolSmsProv);


    Cheers...
    Dushyant Gaur
    Sling Media,
    Bangalore
    cell:+91 9342276086
    email: dushyantg@slingmedia.com

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,567

    Re: how to Scan and get inbox's unread message?

    Search for Inbox in the Wiki, as Jukka has suggested.

Posting Permissions

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