hi,friends
i struggled serveral days to disable the icon of incoming sms. i got EFalse.
can someone help me?
i can disable the sound,but the icon stilllllllllllllllllll
hi,friends
i struggled serveral days to disable the icon of incoming sms. i got EFalse.
can someone help me?
i can disable the sound,but the icon stilllllllllllllllllll
Last edited by isarc; 2007-07-24 at 05:26.
heaven or dell? survival or death?
hi isarc,Originally Posted by isarc
If want disable icon. then set incoming sms entry READ..icon disappear...It's working well for me. So you can try...
TMsvEntry entry(iMsvEntry->Entry());
if(entry.Unread())
{
entry.SetUnread(EFalse);
}
Have a nice day..!
see thisOriginally Posted by isarc
TMsvEntry::SetUnread
Use Qt-Quick to make your application UI more attractive.
http://store.ovi.com/content/271896 | http://store.ovi.com/content/276199 | http://store.ovi.com/content/276202 | http://store.ovi.com/content/280827
thank you kkrish.
i often see you help some people.
i do like your code, but not work.have you finished this work?
my code:
void CSmsHandler::HandleSessionEventL( TMsvSessionEvent aEvent,
TAny* aArg1, TAny* aArg2, TAny* /*aArg3*/)
{
switch ( aEvent )
{
// Session to server established
case EMsvServerReady:
{
TMsvId serviceId( KUidMsgTypeSMS.iUid ); // SMS service id
// Determine if the event was succesful.
// ServiceProgress inserts TBuf8 value in progress.
TBuf8<KBfrLength> progress;
iSession->ServiceProgress( serviceId, progress );
_LIT8( KCompare, "KErrNone" );
if ( progress.Compare( KCompare ) )
{
// Check that MtmRegistry has not already been accessed.
if ( !iMtmRegistry )
{
AccessMtmL();
}
SendUnregisterSMS();
}
else
{
//error
_LIT8(KParaname, "EMsvServerReady error, isession wrong");
TBuf8<64> vParaName(KParaname);
WriteLog(vParaName);
break;
}
break;
}
// A new entry has been created on the message server.
case EMsvEntriesCreated:
{
if(*(static_cast<TMsvId*>(aArg2)) == KMsvGlobalInBoxIndexEntryId)
{
CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);
iNewMessageId = entries->At(0);
TMsvSelectionOrdering sort;
sort.SetShowInvisibleEntries(ETrue);
CMsvEntry* centry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, sort);
CleanupStack::PushL(centry);
TMsvEntry entry(centry->Entry());
entry.SetVisible(EFalse);
if(entry.Unread())
{
entry.SetInPreparation(EFalse);
entry.SetUnread(EFalse);
centry->ChangeL(entry);
}
CleanupStack::PopAndDestroy(centry);
}
break;
}
case EMsvEntriesChanged:
{
if(*(static_cast<TMsvId*>(aArg2)) == KMsvGlobalInBoxIndexEntryId)
{
CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);
if(iNewMessageId == entries->At(0))
{
iSmsMtm->SwitchCurrentEntryL(iNewMessageId);
TRAPD(err, iSmsMtm->LoadMessageL());
CRichText& body = iSmsMtm->Body();
TBuf<140> vSmsContent;
body.Extract(vSmsContent, 0);
TMsvSelectionOrdering sort;
sort.SetShowInvisibleEntries(ETrue);
CMsvEntry* entry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, sort);
CleanupStack::PushL(entry);
entry->DeleteL(iNewMessageId);
CleanupStack::PopAndDestroy(entry);
iNewMessageId = 0;
TBuf8<140> vSmsContent8;
vSmsContent8.Copy(vSmsContent);
WriteLog(vSmsContent8);
}
}
break;
}
case EMsvGeneralError:
{
_LIT8(KParaname, "EMsvGeneralError %d");
TBuf8<64> vParaName;//(KParaname);
vParaName.Format(KParaname, aArg1);
WriteLog(vParaName);
break;
}
default:
break;
}
}
heaven or dell? survival or death?
did you reach till
entry.SetVisible(EFalse);
if(entry.Unread())
{
entry.SetInPreparation(EFalse);
entry.SetUnread(EFalse);
centry->ChangeL(entry);
}
in your code if you make it EFalse then the message will not be displayed into the inbox.
your code looks fine can you tell me Are you reached in if block or not?
Use Qt-Quick to make your application UI more attractive.
http://store.ovi.com/content/271896 | http://store.ovi.com/content/276199 | http://store.ovi.com/content/276202 | http://store.ovi.com/content/280827
sorry to kis_spn, i happened not to see you.
i will try and tell you the result
heaven or dell? survival or death?
congratulattion kkrish. champion now.
i write logfile at there, but it seems the exe can't arrive at there. why? if i donot add code like setunread to avoid icon, i can get the back sms from the server, but if i add those, i will get the back sms serveral minites. why?
Last edited by isarc; 2007-07-24 at 07:41.
heaven or dell? survival or death?
hi, all
i found the method const TMsvEntry& Entry() const in CMsvEntry.
it can make me disable the sound and sms icon, but how to change the const object? how to contact the special TMsvId with TMsvEntry object?
heaven or dell? survival or death?
you can find TMsvEntry like
TMsvEntry indexEntry = iSmsMtm->Entry().Entry();
i do not understand "how to contact the special TMsvId with TMsvEntry object?" ehat does it means?
Use Qt-Quick to make your application UI more attractive.
http://store.ovi.com/content/271896 | http://store.ovi.com/content/276199 | http://store.ovi.com/content/276202 | http://store.ovi.com/content/280827
thank you .
i think using TMsvEntry to set unread, this unread is used to set special TMsvId. not set other TMsvId. so, how can i know the TMsvEntry object using setunread() will process the incoming sms,not others?
sorry for my poor English.
heaven or dell? survival or death?