×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Regular Contributor
    Join Date
    Apr 2004
    Posts
    322

    send SMS on Series 60

    Hi
    Please take a look at the code I try in order to send a sms message (for now there is no text in it ).

    in the emulator the execute goes without errors and with a system info message the the mms message was sent ,
    In the Nokia 6600 there is no error , but also no info message , and no sms is sent (at least not to the number I wrote , which is a regular mobile ).

    *** what do I do wrong ?

    *** also , how can I add a simple text or header to the message , like for example "Start Message"?

    Thanks in advance , TE

    Code:
    class CMTMSmsSender : public MMsvSessionObserver
    {
    public:
    	CMTMSmsSender();
    	~CMTMSmsSender();
    	void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
    	void SendL();
    	CMsvSession * iSession;
    	CMmsClientMtm * iMmsMtm;
    	CClientMtmRegistry * iMtmReg;
    };
    
    
    void CMyAppAppView::CmdSendL()
    {
    	CMTMSmsSender * smsSender = new (ELeave) CMTMSmsSender;
    	smsSender->Send();
    }
    
    void CMTMSmsSender::Send()
    {
    	iSession = CMsvSession::OpenSyncL(*this);
    	iMtmReg = CClientMtmRegistry::NewL(*iSession);
    	iMmsMtm =
    		(CMmsClientMtm*)iMtmReg->NewMtmL(KUidMsgTypeMultimedia);
    	// Set context to the parent folder (Drafts)
    	iMmsMtm->SwitchCurrentEntryL(KMsvDraftEntryId);
    	iMmsMtm->CreateMessageL(iMmsMtm->DefaultSettingsL());
    	_LIT(KPhoneNumber, "0501234567");
    	iMmsMtm->AddAddresseeL(KPhoneNumber);
    	// Set the message’s status flags appropriately
    	TMsvEntry ent = iMmsMtm->Entry().Entry();
    	ent.SetInPreparation(EFalse);
    	ent.SetVisible(ETrue);
    	iMmsMtm->Entry().ChangeL(ent); // Commit changes
    	iMmsMtm->SaveMessageL();
    	// Start sending the message via the Server MTM to the MMS
    	// server
    	CMsvOperationWait* wait = CMsvOperationWait::NewLC();
    	wait->iStatus = KRequestPending;
    	CMsvOperation* op = iMmsMtm->SendL(wait->iStatus);
    	wait->Start();
    	CleanupStack::PushL( op );
    	CActiveScheduler::Start(); // returns when wait completes
    	CleanupStack::PopAndDestroy(2); // op, wait
    }

  2. #2
    Regular Contributor
    Join Date
    Apr 2004
    Posts
    322

    OOPS

    now I understand that this code is for MMS and not SMS !!!
    I need a simple SMS text message ,
    by now couldnt find a simple example for the series 60 ,
    anyone knows of one ???

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    you could try GDSMS, thou then you need to fetch some extra headers to your SDK to get it working.

    yucca

  4. #4
    Regular Contributor
    Join Date
    Apr 2004
    Posts
    322
    do you mean this example ? http://discussion.forum.nokia.com/fo...ht=%2Agdsms%2A

    if I have to aded headers to the SDK , doesnt it create a problem when using the app in the real device ?

    Thanks

  5. #5
    Registered User
    Join Date
    Jun 2004
    Posts
    103
    adding extra headers only causes problem if the associated dll is not in your phone , so you can have a look at you SDK's default installation that if it has associated dlls then .......using any extra headers won't cause problemO
    takecare

  6. #6
    Regular Contributor
    Join Date
    Apr 2004
    Posts
    322
    Thanks a lot ,
    well I managed to send the SMS finally !!!
    this example code is great and it is good that it was posted here ...

    the implementation of the SMS is all inside the AppUi ,
    is there any problem using another class which inherits the MMsvSessionObserver class and implement all the messaging methods in it ?
    is there a special reason that the implementation is in the AppUi ?

  7. #7
    Regular Contributor
    Join Date
    Aug 2003
    Posts
    128
    Hi,

    Can this example work on Nokia 6600?

    Regards,
    Zhen

  8. #8
    Regular Contributor
    Join Date
    Apr 2004
    Posts
    322

    I checked it on the Nokia 6600 ...

    and it works fine !!!
    :-)

  9. #9
    Regular Contributor
    Join Date
    Aug 2003
    Posts
    128
    Hi,

    I know this example is suppose to work on 6600.. but when i test it out on my 6600, I get an Applicaiton Closed error when i recieve an SMS. My application is supposed to intercept whenever there is an incoming SMS. Had anybody experience this b4 and know y?

    Regards,
    zhen

  10. #10
    Regular Contributor
    Join Date
    Apr 2004
    Posts
    322
    I didnt check incoming calls , only sent calls , sorry :-(

  11. #11
    Regular Contributor
    Join Date
    Nov 2004
    Location
    INDIA
    Posts
    84
    can you please send me the source for sending sms on series60(nokia6600) with correct header files

    rgds,
    mani

Posting Permissions

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