×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    4

    Send SMS message

    Hellloooo!!!

    Is there any API to "switch to the 'new sms' view in messaging and the to-recipient is set to the phone number that I supply"? To explain this further; in my application I have a phone number. When the user needs support (i.e. the user clicks a certain button), then I want to open the "new sms" view, the phone number in this view must be pre-set to my support number. So as you understand, I am not interested in the RSendAs API, I need an API to launch the built-in "new sms" view (and supply the phone number that must be set in the to-field).

    Thanks for any help.
    //Ola

  2. #2
    Regular Contributor
    Join Date
    Feb 2008
    Location
    Pune, India
    Posts
    340

    Re: Send SMS message

    Hello,

    I was successful in opening an SMS using the following code snippet [see the line iOperation = ui->ViewL( iStatus );]. Check if CBaseMtmUi::EditL() function can help you open up the New SMS Editor.

    Code:
    iMtmUiReg = CMtmUiRegistry::NewL( *iSession );
    
    	CMsvEntry* serverEntry = iSession->GetEntryL( iMessageId );
    	CleanupStack::PushL( serverEntry );
    
    	// Create new MTM.
    	CBaseMtm* clientMtm = iMtmRegistry->NewMtmL( serverEntry->Entry().iMtm );// );
    
    	CleanupStack::PushL( clientMtm );
    	clientMtm->SwitchCurrentEntryL( serverEntry->EntryId() );
    
    	CBaseMtmUi* ui = iMtmUiReg->NewMtmUiL( *clientMtm ); // UI MTM for SMS
    	CleanupStack::PushL( ui );
    
    	// Display the SMS using the UI MTM.
    	iOperation = ui->ViewL( iStatus );
    	CleanupStack::PopAndDestroy( 1 ); // ui, clientMtm, serverEntry
    Regards,
    Sainagakishore Srikantham (Kishore)

    Don't Hope, KNOW!!! ---------- Visit me at http://ssnkishore.blogspot.com ----------

  3. #3
    Regular Contributor
    Join Date
    May 2008
    Location
    Budapest, Hungary
    Posts
    84

    Re: Send SMS message

    Quote Originally Posted by olamelen View Post
    I want to open the "new sms" view, the phone number in this view must be pre-set to my support number.
    You can achieve exactly this by using CSendUI's CreateAndSendMessageL method.

    Here's the API reference, and an example from the wiki I've used successfully.

    Be aware that if you launch the message editor embedded (last argument, true by default), your application will block until the editor is closed.

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    4

    Re: Send SMS message

    Hi all!

    Many thanks for your help!

    If you are interested in the result, then have a look at the application "SMS and MMS Diary" - the fastest message reader in the world.

    Can be downloaded from
    http://www.smsdiary.eu

    //Ola

  5. #5
    Regular Contributor
    Join Date
    Feb 2008
    Location
    Pune, India
    Posts
    340

    Re: Send SMS message

    Really nice application. I am very naive as far as UI programming is concerned. Could you tell me how you designed the UI for it? Thanks in anticipation.
    Regards,
    Sainagakishore Srikantham (Kishore)

    Don't Hope, KNOW!!! ---------- Visit me at http://ssnkishore.blogspot.com ----------

  6. #6
    Registered User
    Join Date
    Jan 2005
    Posts
    4

    Re: Send SMS message

    Many thanks for your compliments!

    Well I have written all the UI myself and completely left out all S60 specific UI controls (and also UIQ specific controls). By doing so I get more control of the UI, the UI behaves the way I want it to behave and at last, the UI is faster than with native controls.

    regards
    Ola

  7. #7
    Regular Contributor
    Join Date
    Feb 2008
    Location
    Pune, India
    Posts
    340

    Re: Send SMS message

    Any pointers on "How to start your own UI development?" from your side?
    Regards,
    Sainagakishore Srikantham (Kishore)

    Don't Hope, KNOW!!! ---------- Visit me at http://ssnkishore.blogspot.com ----------

Similar Threads

  1. Send SMS message via bluetooth to a LOCAL phone
    By dinne in forum General Messaging
    Replies: 2
    Last Post: 2008-07-09, 13:33
  2. Send message / send sms
    By slave89 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2008-05-04, 11:02
  3. carbide-error
    By upendersolanki in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 5
    Last Post: 2008-02-06, 11:09
  4. Replies: 0
    Last Post: 2002-06-03, 03:13
  5. Replies: 0
    Last Post: 2002-06-03, 03:11

Posting Permissions

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