Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor s_mehdi76's Avatar
    Join Date
    Apr 2008
    Posts
    76
    Hi,
    i want to extract the from address and body from the incoming SMS, but it is failed to extract the from address (and may be body not confirmed) from SMS,
    i am working on s60 3rd fp1, so kindly help me , using following code:

    ........
    // Get address of received message.
    TBuf<KSmsMessageLength> iAddress(iMsvEntry->Entry().iDetails);
    if (store->HasBodyTextL())
    {
    CSmsClientMtm* SmsMtm = STATIC_CAST(CSmsClientMtm*,iEngine->iClientMtmReg->NewMtmL(KUidMsgTypeSMS));
    if(SmsMtm)
    {
    CleanupStack::PushL(SmsMtm);
    SmsMtm->SwitchCurrentEntryL(iNewMessageId);
    SmsMtm->LoadMessageL();
    CDesCArrayFlat* AddressArray = new (ELeave)CDesCArrayFlat(1);
    HBufC* BodyBuffer = HBufC::NewL(SmsMtm->Body().DocumentLength());
    TPtr BodyPoint(BodyBuffer->Des());
    SmsMtm->Body().Extract(BodyPoint,0,SmsMtm->Body().DocumentLength());
    for(int i = 0; i < SmsMtm->AddresseeList().Count(); i++)
    {
    TBuf<100> buf;
    buf.Copy(SmsMtm->AddresseeList()[i]);
    AddressArray->AppendL(buf);
    }

    TMsvEntry msvEntry((SmsMtm->Entry()).Entry());
    iObserver.MessageReceivedL(iNewMessageId,AddressArray,BodyBuffer);
    CleanupStack::PopAndDestroy(1);
    }
    }

    thanx in advance.

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Forum Nokia has a main site, www.forum.nokia.com, there you can click on Documentation/Symbian C++ on the left, and browse examples under the "Messaging" link.

  3. #3
    Nokia Developer Champion kiran10182's Avatar
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,234
    Also it is worth trying to search on Wiki. There are good articles on messaging.

    Kiran.
    Nokia Developer Wiki Moderation team

  4. #4
    Regular Contributor Cleanup_Stack_PushL's Avatar
    Join Date
    May 2008
    Posts
    65
    CSmsHeader& header = iSmsInMtm->SmsHeader();
    aAddress.Append( header.FromAddress() );

Similar Threads

  1. Is new message type possible on S60 Platform?
    By tigle in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2007-10-27, 13:03
  2. Setting sender address in submit message
    By doshiaj in forum General Messaging
    Replies: 1
    Last Post: 2003-04-02, 08:15
  3. problem to send Service Loading push message over 8310
    By alinesimon in forum Mobile Web Site Development
    Replies: 3
    Last Post: 2002-10-23, 07:08
  4. problem to send a service loading message push for 8310
    By alinesimon in forum General Messaging
    Replies: 1
    Last Post: 2002-05-06, 12:39
  5. Problem to send a service loadinfd push message for 8310
    By alinesimon in forum Smart Messaging
    Replies: 1
    Last Post: 2002-05-03, 10:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved