×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Nov 2008
    Location
    Cairo-Egypt
    Posts
    80

    Question [moved] Ctelephoney for the 1000 time!

    hi
    we all now CTelephoney but my question is
    i make my application GUI
    simple or very simple but i want to show cell id
    i found several codes
    like
    GetCellID.cpp
    CCellIDCheck::~CCellIDCheck()
    {
    Cancel();
    delete iTelephony;
    }

    void CCellIDCheck::ConstructL(void)
    {
    iTelephony = CTelephony::NewL();
    iTelephony->GetCurrentNetworkInfo(iStatus, iIdV1Pkg);
    SetActive();
    }

    CCellIDCheck::CCellIDCheck(MCellIdObserver& aObserver)
    : CActive(EPriorityNormal),iObserver(aObserver),iIdV1Pkg(iIdV1)
    {
    CActiveScheduler::Add(this);
    }

    void CCellIDCheck::RunL()
    {
    iObserver.CellIDL(iIdV1.iCountryCode,iIdV1.iNetworkId,iIdV1.iLocationAreaCode,iIdV1.iCellId);

    }

    void CCellIDCheck:oCancel()
    {
    iTelephony->CancelAsync(CTelephony::EGetCurrentNetworkInfoCancel);
    }





    GetCellID.h
    #include <Etel3rdParty.h>


    class MCellIdObserver
    {
    public:
    virtual void CellIDL(const TDesC& aCountryCode,const TDesC& aNwId,TUint aAreaCode,TUint aCellId) = 0;
    };


    class CCellIDCheck : public CActive
    {
    public:
    CCellIDCheck(MCellIdObserver& aObserver);
    void ConstructL(void);
    ~CCellIDCheck();
    private:
    void RunL();
    void DoCancel();
    private:
    MCellIdObserver& iObserver;
    CTelephony* iTelephony;
    CTelephony::TNetworkInfoV1 iIdV1;
    CTelephony::TNetworkInfoV1Pckg iIdV1Pkg;
    };


    fine
    but where i can put this codes
    such that i show cell id in an AlertWindow for example


    assume that i make a new project which is named by GetCellID

    i tried to paste it but give me several errors

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Ctelephoney for the 1000 time!

    If u want u can put it in your appui. But best way is create seperate class and keep this code in that class. Create one observer which notify your appui on incomming call and there display ur cell id.

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,345

    Smile Re: Ctelephoney for the 1000 time!

    Quote Originally Posted by zohirey2 View Post
    but where i can put this codes
    such that i show cell id in an AlertWindow for example


    assume that i make a new project which is named by GetCellID

    i tried to paste it but give me several errors
    These instructions will help you, I wish: http://wiki.forum.nokia.com/index.ph...y#Instructions
    Nokia Developer Wiki Moderation team

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Ctelephoney for the 1000 time!

    assume that i make a new project which is named by GetCellID

    i tried to paste it but give me several errors
    what errors you are getting ?

Similar Threads

  1. the real UTC ( Universal Time )
    By telephia in forum Symbian
    Replies: 5
    Last Post: 2007-05-16, 18:10
  2. Bizarre calendar/time zone change handling in Nokia 9500
    By noetus in forum General Development Questions
    Replies: 0
    Last Post: 2005-09-19, 19:27
  3. Log time bug on 3650. Help me please.
    By hemenkap in forum General Development Questions
    Replies: 2
    Last Post: 2005-06-30, 07:18
  4. How to get correct time.
    By dzaga in forum Mobile Java General
    Replies: 2
    Last Post: 2003-08-06, 22:03
  5. SMS time stamp format with time zone parameter?
    By turunhe in forum General Messaging
    Replies: 1
    Last Post: 2002-06-11, 07:00

Posting Permissions

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