Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:Get SIM status in S60 2nd Edition

From Wiki
Jump to: navigation, search

Archived.pngArchived: 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
CompatibilityArticle
Created: savaj (01 May 2009)
Last edited: hamishwillee (19 Jun 2012)

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.lib

Source 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;
}
 
}


Related link:

This page was last modified on 19 June 2012, at 01:02.
31 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×