×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    41

    Problem in retrieving IMSI number

    I am using symbain v9, carbide c++ and c++.net.

    I want to retrive IMSI number, i used the code which is written in sdk example, my application crash when i called "GetSubscriberId" function, i also have "ReadDeviceData" capablity.

    ///////////////////
    #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:oCancel()
    {
    iTelephony->CancelAsync(CTelephony::EGetSubscriberIdCancel);
    }

    ///////////////////

    I call SomeFunction() in my appui class in this way

    ///////////////////
    CTelephony* aTelephony;
    CClientApp* cca = new(ELeave) CClientApp(aTelephony);
    cca->SomeFunction();
    //////////////////

    is there anyone who know the solution plz suggest me where i am doing mistake.

  2. #2
    Registered User
    Join Date
    Jun 2004
    Posts
    177

    Re: Problem in retrieving IMSI number

    in constructor u missing:
    CActiveScheduler::Add( this );

    in SomeFunction:
    aTelephony = CTelephony::NewL();

    remember that this is async. call, u better may delete aTelephony after RunL callback


    (check this: http://discussion.forum.nokia.com/fo...ad.php?t=73932 )

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    41

    Re: Problem in retrieving IMSI number

    Thanks buddy u solve my problem ......

Similar Threads

  1. Problem MMC+USB Connection
    By Fede81 in forum Symbian
    Replies: 1
    Last Post: 2007-06-14, 06:13
  2. Problem MMC+USB Connection
    By Fede81 in forum General Development Questions
    Replies: 3
    Last Post: 2006-07-19, 15:21
  3. center with sms port number problem
    By Ratmil in forum General Messaging
    Replies: 0
    Last Post: 2006-04-09, 03:22
  4. Replies: 0
    Last Post: 2003-10-31, 04:08
  5. Serial Number Problem
    By koogy in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2002-09-17, 15:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×