×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Regular Contributor
    Join Date
    Mar 2007
    Location
    Bangalore, India
    Posts
    69

    How to send more than one sms at a time.

    Hi All,

    I want to send more than one sms to the same number at the same time.

    Regards,
    Girish
    Girish_VMX

  2. #2
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Re: How to send more than one sms at a time.

    Hi

    refer following code.

    TBool CSmsHandler::CreateMsgL()
    {
    ........
    // Recipient number is displayed also as the recipient alias.
    entry.iDetails.Set( iRecipientNumber );

    // Add addressee.
    TBuf<15> PhoneNumber2;
    PhoneNumber2.Copy(_L("9999999999")); //This is second number on which message will be sent
    iSmsMtm->AddAddresseeL( iRecipientNumber, entry.iDetails );
    iSmsMtm->AddAddresseeL( PhoneNumber2, entry.iDetails );
    ......
    .......
    }

    regards
    Tanya

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to send more than one sms at a time.

    If you use the Mtm-based approach, you can try what happens if you pass multiple TMsvId-s in the CMsvEntrySelection array to InvokeAsyncFunctionL. Otherwise it is always possible to send messages one-by-one.

  4. #4
    Regular Contributor
    Join Date
    Mar 2007
    Location
    Bangalore, India
    Posts
    69

    Re: How to send more than one sms at a time.

    Hi,

    Please tell me how to send one by one sms to the same number. for example, i have 3 sms and i want to send 3 sms to a single number at a time.
    Girish_VMX

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to send more than one sms at a time.

    Hmm, can you send one SMS?

  6. #6
    Regular Contributor
    Join Date
    Mar 2007
    Location
    Bangalore, India
    Posts
    69

    Re: How to send more than one sms at a time.

    Yes. I am able to send one sms but not more than that.
    Girish_VMX

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to send more than one sms at a time.

    And which API do you use?

  8. #8
    Regular Contributor
    Join Date
    Mar 2007
    Location
    Bangalore, India
    Posts
    69

    Re: How to send more than one sms at a time.

    Hi,
    The following is the code.
    Please take a look.

    void CSmsSendHandler::CreateNewMessageL()
    {
    TMsvEntry newEntry; // This represents an entry in the Message Server index
    newEntry.iMtm = KUidMsgTypeSMS; // message type is SMS
    newEntry.iType = KUidMsvMessageEntry; // this defines the type of the entry: message
    newEntry.iServiceId = KMsvLocalServiceIndexEntryId; // ID of local service (containing the standard folders)
    newEntry.iDate.HomeTime(); // set the date of the entry to home time
    newEntry.SetInPreparation(ETrue); // a flag that this message is in preparation

    // - CMsvEntry accesses and acts upon a particular Message Server entry.
    // - NewL() does not create a new entry, but simply a new object to access an existing entry.
    // - It takes in as parameters the client's message server session,
    // ID of the entry to access and initial sorting order of the children of the entry.
    CMsvEntry* entry = CMsvEntry::NewL(*iSession, KMsvDraftEntryIdValue, TMsvSelectionOrdering());
    CleanupStack::PushL(entry);

    iOperation = entry->CreateL(newEntry, iStatus);
    CleanupStack::PopAndDestroy(entry);

    // The RunL of this class will trigger when the server completes the request
    SetActive();
    iPhase = EWaitingForCreate;
    LOGMSG((_L("Set Active Invoked")));
    }

    void CSmsSendHandler::SendToL(const TDesC& aRecipient, const TDesC& aMessage)
    {
    TInt e;
    iRecipientsTelNum = aRecipient;
    if (iSmsMessage) {
    delete this->iSmsMessage;
    this->iSmsMessage = NULL;
    }

    iSmsMessage = HBufC::NewL(aMessage.Length());
    TRAP(e, iSmsMessage = HBufC::NewL(aMessage.Length()));
    if (e != KErrNone)
    {
    User::Leave(e);
    }

    iSmsMessage->Des().Copy(aMessage);
    LOGMSG((_L("Message Stored")));
    CreateNewMessageL();
    }
    Girish_VMX

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to send more than one sms at a time.

    I cannot see any sending operations in fact.

  10. #10
    Regular Contributor
    Join Date
    Mar 2007
    Location
    Bangalore, India
    Posts
    69

    Re: How to send more than one sms at a time.

    for sending sms am calling SendToL(recipient, message) function. That function is pasted above.
    Girish_VMX

  11. #11
    Registered User
    Join Date
    Jan 2008
    Posts
    6

    Re: How to send more than one sms at a time.

    Hi!

    Did you resolve your problem?
    I'm facing a similar problem, so I'd appreciate if you give me some feedback...

    Thanks!

Similar Threads

  1. Replies: 9
    Last Post: 2010-08-03, 07:03
  2. Please, explain how to send concatenated SMS
    By rzientara in forum General Messaging
    Replies: 12
    Last Post: 2009-07-06, 04:08
  3. AT commands to send sms from pc by n70
    By cristiandaffy in forum Wired and Wireless interfaces (Closed)
    Replies: 0
    Last Post: 2007-12-07, 15:38
  4. Replies: 1
    Last Post: 2004-02-18, 13:31
  5. Replies: 0
    Last Post: 2002-06-03, 03:13

Posting Permissions

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