hi friends i'm trying to create fake sms in my inbox folder i can able to create successfully but the problem is i'm not able to set the date of the sms. i dont want to set the date to current date i want to set like 01-01-2000. any body please help me. i want 2 things that are.
1. i know how to read the date, after reading i want save this into a file.
is this right..
TInt64 date=entry1.iDate.Int64();
i'm saving this int valuse.
2. using above saved date i want to set the date.
while setting i'm using the above int value to set the date, like this is this correct..
TTime time(date);
entry.iDate=time;
but this is not working...
this is the code i'm using..i tried everything but no use.. please help me...
TInt TimeInt;
TLex tlex(aTime);
tlex.Val(TimeInt);
TTime time(TimeInt);
iSmsMtm->SwitchCurrentEntryL( aFolderId );
iSmsMtm->CreateMessageL( KUidMsgTypeSMS.iUid );
CMsvStore* aMessageStore = iSmsMtm->Entry().EditStoreL();
CleanupStack::PushL( aMessageStore );
CleanupStack::PopAndDestroy( aMessageStore );
CRichText& body = iSmsMtm->Body();
body.Reset();
body.InsertL( 0, aMsgText );
TMsvEntry entry = iSmsMtm->Entry().Entry();
entry.SetInPreparation( EFalse );
entry.SetVisible( EFalse );
//entry.iDate=time;
entry.iDate.UniversalTime();// i dont want this , i want to set my own date like 01-01-2000
// TTime msgTime;
// msgTime.UniversalTime();
// entry.iDate.HomeTime();
entry.iDescription.Set( aDescription );
entry.iDetails.Set( aAddress );
entry.SetUnread( EFalse );
iSmsMtm->Entry().ChangeL(entry);
iSmsMtm->SaveMessageL();
i want to know two things, how to save the save and using that saved value how to set...

Reply With Quote




