This tutorial describes how an application gets the subscriber identification information.
#include <e32base.h> #include <Etel3rdParty.h> class CClientApp : public CActive { private: CTelephony* iTelephony; CTelephony::TSubscriberIdV1 iSubscriberIdV1; CTelephony::TSubscriberIdV1Pckg iSubscriberIdV1Pckg; public: CClientApp(CTelephony* aTelephony); void SomeFunction(); private: /* These are the pure virtual methods from CActive that MUST be implemented by all active objects */ void RunL(); void DoCancel(); }; CClientApp:: CClientApp(CTelephony* aTelephony) : CActive(EPriorityStandard), iTelephony(aTelephony), iSubscriberIdV1Pckg(iSubscriberIdV1) { //default constructor } void CClientApp::SomeFunction() { iTelephony->GetSubscriberId(iStatus, iSubscriberIdV1Pckg); SetActive(); } void CClientApp::RunL() { if(iStatus==KErrNone) { TBuf<CTelephony::KIMSISize> suscriberId = iSubscriberIdV1.iSubscriberId; } } void CClientApp::DoCancel() { iTelephony->CancelAsync(CTelephony::EGetSubscriberIdCancel); }