×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    6

    Error when deleting outgoing sms, how could we hide it or avoid it ?

    Hi Champions

    I have developed a small application to monitor the outgoing SMSs and to stop it from being sent, after we capture it's number and text, so we will send it later using some internet service.

    Now the code interupt the sms correctly and delete it and it is not being sent already Great.
    But just after it is deleted it gives a system error message "General: Message Deleted".

    this error does not affect any thing. the sms is already handled, and, but this error nags the user.

    trying to move the sms from outgoing to sent folder does not affect stop the message from sending.

    is there any alternative solutions, or how could i hide that system message ?

    Thanx
    Khalid



    my code to delete it under HandleSessionEventL() event





    Code:
    case EMsvEntriesChanged:
    
        TMsvId Id = *(static_cast<TMsvId*>(aArg2));
    	if(Id == KMsvGlobalOutBoxIndexEntryId)
    	    {
    
    	    
    	    CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);
    	
    	    if (iNewMessageId == entries->At(0))
    		    {
    		
    		    if( !iMsvEntry )
    			    {
    			    return;
    			    }
    		
    		    // Set entry context to the new message
    		    iMsvEntry->SetEntryL(iNewMessageId);
    		    if ( iMsvEntry->Entry().iMtm != KUidMsgTypeSMS ||!iMsvEntry->Entry().Complete() )
    			    {
    			    return;
    			    }
    		 
    		    
    		    // Read-only store.
    		    CMsvStore* store = iMsvEntry->ReadStoreL();
    		    CleanupStack::PushL(store);
    		    TBuf<50> num(iMsvEntry->Entry().iDetails);
    		    MobileNumber.Copy(num);
    		    if (store->HasBodyTextL())
    			    {
    			    CRichText* richText = CRichText::NewL(
    			    CEikonEnv::Static()->SystemParaFormatLayerL(),
    			    CEikonEnv::Static()->SystemCharFormatLayerL());
    			    CleanupStack::PushL(richText);
    			    store->RestoreBodyTextL(*richText);
    			    const TInt length = richText->DocumentLength(); 
    			    SMSText = richText->Read(0, length); 
    			    CleanupStack::PopAndDestroy(richText);
    			    }
    		    CleanupStack::PopAndDestroy(store);
    		    
    		    
    		    // change state to sent, does not have effect.
    		    TMsvEntry entry = iMsvEntry->Entry();
    		    entry.SetSendingState( KMsvSendStateSent );
    		    
    
    		    // Delete the sms, way 1, gives "Message Deleted" error
    		    //iMsvSession->RemoveEntry(iNewMessageId);
    
    
    		    // Delete the sms, way 2, gives "Message Deleted" error
    		    iMsvEntry->DeleteL(iNewMessageId);

  2. #2
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: Error when deleting outgoing sms, how could we hide it or avoid it ?

    Hi kahlid i m doing like this but when i send any sms then i go in EMsvEntriesChanged, but after that i do not go forward, code moving in following area
    Code:
    if(iNewMessageId == entries->At(0));
    				{
    					print_int(2);
    					 if( !iMsvEntry )
    				    {
    				    	print_int(3);
    				    	return;
    				    } 
    }
    SMS send not delete. please help me if u did this.

    Thanks
    Amit

Similar Threads

  1. outgoing sms Interception
    By saji_iq in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2009-05-19, 10:31
  2. Avoid J2ME Application hide on (END) Key.
    By Amit21 in forum Mobile Java General
    Replies: 2
    Last Post: 2008-01-25, 08:53
  3. Replies: 2
    Last Post: 2007-11-10, 13:19
  4. Replies: 1
    Last Post: 2007-10-08, 06:33
  5. Hide sms in symbian series 60 3rd ed ver 9.1
    By earendil in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2007-09-28, 11:40

Posting Permissions

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