×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Mar 2006
    Location
    India
    Posts
    138

    Red face How to get successfule status of the sent message?

    Hi
    I am developing an application which sends SMS asynchronously and I need to know has the SMS been sent OK or not.

    I have tried to use RSendAsMessage::ProgressL function to obtain progress information, but currently it returns only ESendStateFailed even if the SMS was sent successfully. Is it a bug? I have tested this using E70, emulator is out of the question.

    Here is the code:

    void SendSmsL(const TDesC& aAddr, const TDesC& aMsg)
    {
    RSendAs sendAs;
    User::LeaveIfError(sendAs.Connect());
    CleanupClosePushL(sendAs);

    RSendAsMessage sendAsMessage;
    sendAsMessage.CreateL(sendAs, KUidMsgTypeSMS);
    CleanupClosePushL(sendAsMessage);


    // prepare the message
    sendAsMessage.AddRecipientL(aAddr, RSendAsMessage::ESendAsRecipientTo);
    sendAsMessage.SetBodyTextL(aMsg);

    // send the message asynchronously
    TRequestStatus status;
    sendAsMessage.SendMessage(status);
    User::WaitForRequest( status );

    if (status == KErrNone)
    {
    TSendAsProgress progress;
    sendAsMessage.ProgressL( progress );

    if ( progress.iState == CMsvSendOperation::ESendStateDone )
    {

    }
    if ( progress.iState == CMsvSendOperation::ESendStateFailed )
    {
    //goes here everytime.
    }

    iObserver.MessageSent();
    }
    else
    {
    iObserver.SmsEngineError(status.Int());
    }

    // sendAsMessage (already closed)
    CleanupStack::Pop();

    // sendAs
    CleanupStack::PopAndDestroy();
    }


    Plz let me know if it is a known issue/defect.

    Thanks
    Regards
    Anand Jain
    Last edited by anand_zain76; 2008-03-27 at 11:31.

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

    Re: How to get successfule status of the sent message?

    you could check the SMS exmaples that are using MTMs directly, they would give you better feedback.

Similar Threads

  1. Problem with Cabride.c++ v1.1
    By markovuksanovic in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2007-01-24, 20:05
  2. Replies: 1
    Last Post: 2006-12-18, 20:04
  3. Replies: 3
    Last Post: 2005-07-22, 02:35
  4. Short Message Status Report
    By CBraun in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-10-27, 13:29
  5. Doubt in Nokia PC Connrctivity SDK 2.1 demo (Visual basic).
    By narumugai in forum General Messaging
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

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