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. 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
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;
TInt status = sysAgent.GetState(KUidSIMStatus);
CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
case ESASimOk:
informationNote->ExecuteLD(_L("Sim present in phone and it is ok"));
case ESASimNotPresent:
informationNote->ExecuteLD(_L("Sim not present in phone"));
case ESASimRejected:
informationNote->ExecuteLD(_L("Sim present in phone but rejected by operator"));
informationNote->ExecuteLD(_L("Info not available"));

Related link:

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