×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Oct 2007
    Location
    Noida
    Posts
    152

    Question Confirmation Message while sending the Message

    Hello All,
    I have created an application that is sending a message using 'RSendAsMessage' the message is being sent but everytime it is sending a message it is acking for a confirmation that whether to send the message or not. I dont want this message to be shown to the uses. I just want the message should be sent without any user notification ..

    Some help towards this direction please..

    p.s. The delivery report of the message sent successfully may come.

    many thanks,
    Abhishek karmakar

    never- Never - NEVER -- !!! NEVER !!! GIVE UP

  2. #2
    Registered User
    Join Date
    Nov 2007
    Posts
    444

    Re: Confirmation Message while sending the Message

    Quote Originally Posted by Abhishek_karmakar View Post
    Hello All,
    I have created an application that is sending a message using 'RSendAsMessage' the message is being sent but everytime it is sending a message it is acking for a confirmation that whether to send the message or not. I dont want this message to be shown to the uses. I just want the message should be sent without any user notification ..

    Some help towards this direction please..

    p.s. The delivery report of the message sent successfully may come.

    many thanks,
    Hi Abhishesk,

    Could you please provide us 4-5 lines you made to send SMS using RSendAs?
    Because I think you have set some flag, I did not suffering such issue for RSendAs.

    Regards,
    Kavit.

  3. #3
    Registered User
    Join Date
    Oct 2007
    Location
    Noida
    Posts
    152

    Re: Confirmation Message while sending the Message

    Hello Kavit,
    Thanks for the reply.

    here we are with the header and the .cpp file.
    CRSendAsSender.h
    Code:
    /*
     ============================================================================
     Name		: CRSendAsSender.h
     Author	  : Abhishek karmakar
     Version	 : 1.0
     Copyright   : Your copyright notice
     Description : CCRSendAsSender declaration
     ============================================================================
     */
    
    #ifndef CRSENDASSENDER_H
    #define CRSENDASSENDER_H
    
    #include <e32base.h>	// For CActive, link against: euser.lib
    #include <e32std.h>		// For RTimer, link against: euser.lib
    
    #include <BADESCA.H>
     
    #include <rsendasmessage.h>
    #include <rsendas.h>
    #include <MTCLREG.H>
    #include <smut.h>
    
    
    /*The Observer for the smssernder class ..this notifies when the message is sent.*/
    /*
    class MRSendSMSObserver
    	{
    	public:
    	virtual void MessageSentL(TInt aError);
    	};
    */
    
    class CCRSendAsSender : public CActive
    	{
    public:
    	~CCRSendAsSender();
    	static CCRSendAsSender* NewL(/*MRSendSMSObserver& aObserver,*/ const TDesC& aMessage,const TDesC& aRecipients );
    	
    private:
    	void RunL();
    	void DoCancel();
    	TInt RunError(TInt aError);
    public:
    	CCRSendAsSender(/*MRSendSMSObserver& aObserver*/);
    	void ConstructL(const TDesC& aMessage,const TDesC& aRecipients);
    
    private:
    	TInt iState; // State of the active object
    	RTimer iTimer; // Provides async timing service
    	//MRSendSMSObserver& 	iObserver;
    	RSendAs 			iSendAs;
    	RSendAsMessage		iSendAsMessage;
    
    	};
    
    #endif // CRSENDASSENDER_H
    CRSendAsSender.cpp
    Code:
    /*
     ============================================================================
     Name		: CRSendAsSender.cpp
     Author	  : Abhishek karmakar
     Version	 : 1.0
     Copyright   : Your copyright notice
     Description : CCRSendAsSender implementation
     ============================================================================
     */
    
    #include "CRSendAsSender.h"
    
    /*
    void MRSendSMSObserver::MessageSentL(TInt aError)
    	{
    	
    	}
    	*/
    
    CCRSendAsSender::CCRSendAsSender(/*MRSendSMSObserver& aObserver*/) :
    	CActive(EPriorityStandard)/*, iObserver(aObserver)*/ // Standard priority
    	{
    	}
    CCRSendAsSender* CCRSendAsSender::NewL(/*MRSendSMSObserver& aObserver,*/
    		const TDesC& aMessage, const TDesC& aRecipients)
    	{
    	CCRSendAsSender* self = new (ELeave) CCRSendAsSender(/*aObserver*/);
    	self->ConstructL(aMessage, aRecipients);
    	return self;
    	}
    
    void CCRSendAsSender::ConstructL(const TDesC& aMessage,	const TDesC& aRecipients)
    	{
    	CActiveScheduler::Add(this); // Add to scheduler
    
    	User::LeaveIfError(iSendAs.Connect());
    	iSendAsMessage.CreateL(iSendAs, KUidMsgTypeSMS);
    
    	iSendAsMessage.AddRecipientL(aRecipients,RSendAsMessage::ESendAsRecipientTo);
    	iSendAsMessage.SetBodyTextL(aMessage);
    	
    	
    	iSendAsMessage.SendMessage(iStatus);
    	
    	SetActive();
    	}
    
    CCRSendAsSender::~CCRSendAsSender()
    	{
    	Cancel();
    	iSendAsMessage.Close();
    	iSendAs.Close();
    	}
    
    void CCRSendAsSender::DoCancel()
    	{
    	//iTimer.Cancel();
    	iSendAsMessage.Cancel();
    	}
    
    void CCRSendAsSender::RunL()
    	{
    	//iObserver.MessageSentL(iStatus.Int());
    	}
    TInt CCRSendAsSender::RunError(TInt aError)
    	{
    	return aError;
    	}
    please tell me if it is some flag and how to remove it.

    many thanks
    Abhishek karmakar

    never- Never - NEVER -- !!! NEVER !!! GIVE UP

  4. #4
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: Confirmation Message while sending the Message

    Quote Originally Posted by Abhishek_karmakar View Post
    Hello All,
    I have created an application that is sending a message using 'RSendAsMessage' the message is being sent but everytime it is sending a message it is acking for a confirmation that whether to send the message or not. I dont want this message to be shown to the uses. I just want the message should be sent without any user notification ..

    Some help towards this direction please..

    p.s. The delivery report of the message sent successfully may come.

    many thanks,
    Hi Abhishek,

    Have a look RSendAsMessage Api function SendMessageAndCloseL()
    Description

    Sends this message in the background without confirmation and close the handle. This is a synchronous operation. This will only be allowed to happen if the caller holds sufficient capabilities to perform this action. If the caller does not hold these capabilities, then the message send will be automatically demoted to a confirmed send. The RSendAsMessage API cannot modify or resend the message if this method fails. No progress information is available after calling this API.

    It's means, you will need to assign required capability in MMP file.

  5. #5
    Registered User
    Join Date
    Nov 2007
    Posts
    444

    Re: Confirmation Message while sending the Message

    Yes Abhishek,

    We were using SendMessageAndCloseL() method suggested by Krish.
    Implement it and add capabilities in your project, this will work.

    Regards.

  6. #6
    Registered User
    Join Date
    Oct 2007
    Location
    Noida
    Posts
    152

    Question Re: Confirmation Message while sending the Message

    hello Kishore,
    Thanks for the reply,

    Have a look RSendAsMessage Api function SendMessageAndCloseL()
    I tried this method and found out that its still asking for the same confirmation message in the emulator. (let me check on the phone).

    It's means, you will need to assign required capability in MMP file.
    I have the following capabilities already in my MMP file .. please tell me if i need any more.
    Code:
    CAPABILITY ReadDeviceData ReadUserData
    many thanks
    Abhishek karmakar

    never- Never - NEVER -- !!! NEVER !!! GIVE UP

  7. #7
    Registered User
    Join Date
    Oct 2007
    Location
    Noida
    Posts
    152

    Re: Confirmation Message while sending the Message

    hello kavit,
    can you tell me which capabilities i need to add more in my project plese,
    Abhishek karmakar

    never- Never - NEVER -- !!! NEVER !!! GIVE UP

  8. #8
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Confirmation Message while sending the Message

    hi,

    you need NetworkServices also along with ReadDeviceData ReadUserData
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  9. #9
    Registered User
    Join Date
    Oct 2007
    Location
    Noida
    Posts
    152

    Re: Confirmation Message while sending the Message

    Thank you so much .. its working after i added
    Code:
    CAPABILITY NetworkServices
    and i kept the sending method to
    Code:
    iSendAsMessage.SendMessage(iStatus)
    where istatus is TRequestStatus..

    many thanks
    Abhishek karmakar

    never- Never - NEVER -- !!! NEVER !!! GIVE UP

Similar Threads

  1. Help on sending Message :(
    By vasant21 in forum Symbian
    Replies: 1
    Last Post: 2006-07-07, 06:38
  2. 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
  3. 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
  4. Sending Picture Message across Telcom/Operator
    By amber141 in forum General Messaging
    Replies: 2
    Last Post: 2004-05-14, 14:59
  5. sms message confirmation
    By Nokia_Archive in forum General Messaging
    Replies: 1
    Last Post: 2002-05-22, 18: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
  •  
×