×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    SMS problem????????/

    Hi Experts

    i made an exe that entry sms in inbox according to me, but here number is shows with to, but in simple incoming message number shows with from. How i do this?

    Thanks in advance
    Amit

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

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

    Re: SMS problem????????/

    Thanks wizard

    I am working like this but in inbox messege come but fake number shows with To not from, date and time is correct. Please Help Me.

    Thanks
    Amit

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: SMS problem????????/

    Quote Originally Posted by aamitgupta View Post
    fake number shows with To not from
    Then you have not replaced the Submit PDU with a Delivery one. Check the initial post in the referred thread.

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

    Re: SMS problem????????/

    Hi i replaced, my code is following

    Code:
    iSmsMtm->SwitchCurrentEntryL( aEntry.Id() );
        CMsvEntry& cEntry( iSmsMtm->Entry() );
        TMsvEntry tEntry = cEntry.Entry();
        
        // tEntry caches the CMsvEntry data, but descriptor fields are special-
        // tEntry contains only pointers to the actual text. To preserve it, we need
        // to save it ourselves
        HBufC* details = HBufC::NewLC( tEntry.iDetails.Length() );
        *details = tEntry.iDetails;
        HBufC* description = HBufC::NewLC( tEntry.iDescription.Length() );
        *description = tEntry.iDescription;
        
        // Store the original message text
        CParaFormatLayer* pf = CParaFormatLayer::NewL();
    	CleanupStack::PushL( pf );
    	CCharFormatLayer* cf = CCharFormatLayer::NewL();
    	CleanupStack::PushL( cf );
    	CRichText* richText = CRichText::NewL( pf, cf,
    	                                       CEditableText::EFlatStorage );
        CleanupStack::PopAndDestroy( cf );
        CleanupStack::PopAndDestroy( pf );
        CleanupStack::PushL( richText );
    	CMsvStore* store = cEntry.ReadStoreL();
    	CleanupStack::PushL( store );
    		store->RestoreBodyTextL( *richText );
    	CleanupStack::PopAndDestroy( store );
        // Read the original message content into the richText
    
        // Demonstrate how the message can be modified. 
        // Append some text to the original content
        richText->InsertL( richText->DocumentLength(), _L( ".Changed" ) );	
    
        // Create new message
        iSmsMtm->SwitchCurrentEntryL( aEntry.Parent() ); 
        iSmsMtm->CreateMessageL( KUidMsgTypeSMS.iUid );
    
        // Set the index entry details to be equal to the original message details
        // In the real world application, you might need to copy more details
        TMsvEntry entry = iSmsMtm->Entry().Entry();
        iLastChangedMessageId = entry.Id();
        entry.SetInPreparation( tEntry.InPreparation() );
        entry.SetVisible( tEntry.Visible() );
        entry.iDate = tEntry.iDate;
        // In real app, you might have to regenerate description if the old
        // description doesn't match the changed text
        entry.iDescription.Set( *description );
        entry.iDetails.Set( *details );
        entry.SetUnread( tEntry.Unread() );    
        iSmsMtm->Entry().ChangeL( entry );
        iSmsMtm->SaveMessageL();   
    
        // Now save the original message text
        CMsvStore* messageStore = iSmsMtm->Entry().EditStoreL();
        CleanupStack::PushL( messageStore );
    
        // To make programmatically created message display "From", not "To"
        // in the Messaging application, it is needed to store the ESmsDeliver PDU
        // into the message header
      
        
        CSmsHeader* header = CSmsHeader::NewL( CSmsPDU::ESmsDeliver, *richText );
    
    	
        CleanupStack::PushL( header );
        header->StoreL( *messageStore );
        
        messageStore->StoreBodyTextL( *richText );
    	messageStore->CommitL();
        CleanupStack::PopAndDestroy( header );
        CleanupStack::PopAndDestroy( messageStore );
        CleanupStack::PopAndDestroy( richText );
        CleanupStack::PopAndDestroy( description );
        CleanupStack::PopAndDestroy( details );

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

    Re: SMS problem????????/

    Hi Wizard

    I am attaching cpp file, please find it, and tell me where i am wrong. Please help me.

    Thanks
    Amit
    Attached Files Attached Files

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

    Re: SMS problem????????/

    Hi wizard

    u saw my code, please help me what am i doing for that?

    Thanks
    Amit

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

    Re: SMS problem????????/

    Hi any body help me.

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

    Re: SMS problem????????/

    Hi

    I did that, but two message entry created in inbox one is followed by from and second is to, then i deleted entry, then fro entry delete, but i want to delete to entry,
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

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

    Re: SMS problem????????/

    Thanks for showing interest, i have solved this, thanks a lot.
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

Similar Threads

  1. SMS sending and receiving problem
    By soujirou in forum Symbian Networking & Messaging (Closed)
    Replies: 12
    Last Post: 2008-08-18, 13:34
  2. Sms Receving problem
    By cdoewarrior in forum General Messaging
    Replies: 5
    Last Post: 2007-03-03, 15:47
  3. problem in reading sms index
    By hosam2010 in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2005-06-12, 17:39
  4. SMS Problem with 3650&6600
    By CemKarahan in forum General Messaging
    Replies: 2
    Last Post: 2004-03-10, 21:04
  5. recieve SMS problem
    By ahsamah in forum General Messaging
    Replies: 5
    Last Post: 2004-03-09, 14:12

Posting Permissions

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