×
Namespaces

Variants
Actions
Revision as of 05:41, 26 July 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How to get Subscriber identification

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: polaka_sr (20 Dec 2007)
Last edited: hamishwillee (26 Jul 2012)

This is done using CTelephony using CTelephony::GetSubscriberId().

  • Asynchronous call


Libraries Needed:

LIBRARY Etel3rdParty.lib and euser.lib

Since, this is done using an asynchronous call, one can cancel this using CTelephony::EGetSubscriberIdCancel.


#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:
void RunL();
void DoCancel();
};
 
CClientApp:: CClientApp(CTelephony* aTelephony)
: CActive(EPriorityStandard),
iTelephony(aTelephony),
iSubscriberIdV1Pckg(iSubscriberIdV1)
{
//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);
}


Wiki Internal Links

This page was last modified on 26 July 2012, at 05:41.
77 page views in the last 30 days.
×