×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    14

    Unhappy cant add reciptiant name in message sending.

    hi
    i am trying to develop simple app which send sms to given number. but when that message come in sent item, it not showing me Name of receiptan, as that contact is saved in my mobile.i use following code for that.
    Is there any other way to achive that?
    CSmsSendHandler::NewL(*(meso->smsObserver), tel_number, msg_body, encoding);

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

    Re: cant add reciptiant name in message sending.

    check thagt you set both iDescription, iDetails with your TMsvEntry instance, and it should show nicely.

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    14

    Unhappy Re: cant add reciptiant name in message sending.

    hi symbianyucca, thanks for reply
    i have seted them. please check following code for that
    Code:
      aMsvEntry.iDescription.Set(iMessageText); // message string which user want to send
      aMsvEntry.iDetails.Set(iTelNum);  //iTelNum is string which is phone number entered by user
      aMsvEntry.SetInPreparation(EFalse);   
    
      aMsvEntry.SetSendingState(KMsvSendStateWaiting);   
      aMsvEntry.iDate.UniversalTime();     
    
      //In other function
      iMtm->AddAddresseeL(iTelNum, msvEntry.iDetails);
    where iMessageText and iTelNum are Tbuf type.

    one more behaviour i have noticed. In phone's inbuild messaging app, if i manually enter the number and send message in sent item that app also show me the number only and if i send message with using "Add reciptiant " from option menu to same person, it will show me the name in sent item. so can you please suggest me how can i implement "Add reciptiant" facility with symbian ?
    Last edited by ar_patel; 2008-03-17 at 06:45.

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

    Re: cant add reciptiant name in message sending.

    you have to set it manually from your code, also before you can set it, you could get the name using contacts database APIs.

  5. #5
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: cant add reciptiant name in message sending.

    Did you look at the overloaded variant of AddAddresseeL?
    i.e. the next function after AddAddresseeL in the header file/SDK help
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  6. #6
    Super Contributor
    Join Date
    Jan 2008
    Location
    Bangalore, India
    Posts
    777

    Re: cant add reciptiant name in message sending.

    Quote Originally Posted by ar_patel View Post
    hi symbianyucca, thanks for reply
    i have seted them. please check following code for that
    Code:
      aMsvEntry.iDescription.Set(iMessageText); // message string which user want to send
      aMsvEntry.iDetails.Set(iTelNum);  //iTelNum is string which is phone number entered by user
      aMsvEntry.SetInPreparation(EFalse);   
    
      aMsvEntry.SetSendingState(KMsvSendStateWaiting);   
      aMsvEntry.iDate.UniversalTime();     
    
      //In other function
      iMtm->AddAddresseeL(iTelNum, msvEntry.iDetails);
    where iMessageText and iTelNum are Tbuf type.

    one more behaviour i have noticed. In phone's inbuild messaging app, if i manually enter the number and send message in sent item that app also show me the number only and if i send message with using "Add reciptiant " from option menu to same person, it will show me the name in sent item. so can you please suggest me how can i implement "Add reciptiant" facility with symbian ?

    so what u want,if u want that whenever u send msg using ur app and in sent items it should be show by name rather than number,for this u have to change this line,

    aMsvEntry.iDetails.Set(iTelNum);
    to like this
    aMsvEntry.iDetails.Set(Urname);
    //Urname is a buf that ll contain the name part of that number' entry.
    Regards
    $-Nitesh-$

  7. #7
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: cant add reciptiant name in message sending.

    Nitesh, how would this solve the case where you send an sms to multiple people?

    As I said in my original post, look at the overloaded function where can specify an alias as well as an address.
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  8. #8
    Super Contributor
    Join Date
    Jan 2008
    Location
    Bangalore, India
    Posts
    777

    Re: cant add reciptiant name in message sending.

    Quote Originally Posted by Paul.Todd View Post
    Nitesh, how would this solve the case where you send an sms to multiple people?

    As I said in my original post, look at the overloaded function where can specify an alias as well as an address.
    yes Paul.Todd, u r right.i did not think abt it.
    Regards
    $-Nitesh-$

  9. #9
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,345

    Smile Re: cant add reciptiant name in message sending.

    Yes Paul.

    And here goes direct link for the same purpose.
    * Send message to multiple reciepients

    Kiran.
    Nokia Developer Wiki Moderation team

  10. #10
    Registered User
    Join Date
    Mar 2008
    Posts
    14

    Re: cant add reciptiant name in message sending.

    yes kiran you are right. but my problem is differ. I dont want to send message to multiple people. i want to send only one person and that person name should come in sent item after sending message.
    i am following Nitesh's suggestion that modify iDetail.Set(uname).
    But now problem is that in sent item i am seeing squere boxes instead of name.
    when i debug its showing correct string but not in sent item. i guess format problem but i dont know which format require for that.

    uname is TBuf type.

  11. #11
    Registered User
    Join Date
    Mar 2008
    Posts
    14

    Re: cant add reciptiant name in message sending.

    well i got the solution. following is the algo for that.

    open the contact database.
    serch the contact entry with key as phone number.
    if(Phone number found)
    get the first name
    get the last name
    Append last name with first namw with space(full name = lastname + space + firstname)
    aMsvEntryForDetail.iDetails.Set(fullname->Des());
    return.
    else
    go to next contact entry

  12. #12
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: cant add reciptiant name in message sending.

    In fact CPbkContactItem/Engine::GetContactTitleL can do that for you (and it returns Company if no name is set).

Similar Threads

  1. BIO message sending via BT
    By a_l in forum Bluetooth Technology
    Replies: 3
    Last Post: 2008-12-01, 14:23
  2. Help on sending Message :(
    By vasant21 in forum Symbian
    Replies: 1
    Last Post: 2006-07-07, 06:38
  3. Sending SIP message, how to add authentication header?
    By PrinceAlbertz in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2006-06-01, 13:25
  4. Message Sending Failed message in Nokia 6600 when Memory In Use set to MMC
    By razas in forum General Development Questions
    Replies: 0
    Last Post: 2006-02-01, 07:06
  5. picture message using simple sms sending facilities
    By auvinent in forum General Messaging
    Replies: 1
    Last Post: 2002-12-31, 08:57

Posting Permissions

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