Archived:Get SIM status in S60 2nd Edition
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.
Article Metadata
How to get SIM status in S60 2nd Edition
Following example illustrate how to get SIM status in S60 2nd Edition devices.
SIM status information: Indicates current status of SIM card.
Case1: Say SIM card is present in phone and is ok.
Case2: Say SIM card is not present in phone.
Case3: Say SIM card is present in phone but rejected by operator.
Headers required:
#include <saclient.h>
#include <sacls.h>
Library required:
LIBRARY sysagt.libSource code:
void CSimStatusAppUi::SimStatus()
{
RSystemAgent sysAgent;
sysAgent.Connect();
TInt status = sysAgent.GetState(KUidSIMStatus);
CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
switch(status)
{
case ESASimOk:
{
informationNote->ExecuteLD(_L("Sim present in phone and it is ok"));
break;
}
case ESASimNotPresent:
{
informationNote->ExecuteLD(_L("Sim not present in phone"));
break;
}
case ESASimRejected:
{
informationNote->ExecuteLD(_L("Sim present in phone but rejected by operator"));
break;
}
default:
{
informationNote->ExecuteLD(_L("Info not available"));
}
break;
}
}


(no comments yet)