×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    101

    Get Notification Change

    Hi everybody, here i am again!!!

    I´m using S60 3rd Edition FP1. Using CTelephony and Active Object I have got the network information like in this example:
    http://wiki.forum.nokia.com/index.ph...in_3rd_Edition

    I need to know when the information changes. I know what methods and info classes I have to use BUT my question is:
    - First I have to get the information like in the example and then get info about when it changes and stored it, or
    - Directly, I use ECurrentNetworkInfoChange without having to call to ECurrentNetworkInfo.

    Thanks a lot.

    Regards

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: Get Notification Change

    Hi,

    I have checked my code, where I'm calling ECurrentNetworkInfoChange. I did not find here ECurrentNetworkInfo anywhere - so I guess you don't need to call it.

    BR
    STeN

  3. #3
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    101

    Re: Get Notification Change

    Thanks,

    I have wrotten an error, the method is ECurrentNetworkInfo, sorry i forgot "get". Do you use that?

    Regard

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: Get Notification Change

    Hi,

    I just call:

    iTel->NotifyChange( aStatus, CTelephony::ECurrentNetworkInfoChange, iNetworkInfoPckg );

    where used variables have following meaning:
    iTel is CTelephony*
    aStatus is TRequestStatus from active object
    iNetworkInfoPckg is CTelephony::TNetworkInfoV1Pckg

    Hope it helps,
    BR
    STeN

  5. #5
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    101

    Re: Get Notification Change

    It´s great, you have resolved my question. THANKS!!!

  6. #6
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    101

    Re: Get Notification Change

    Another problem:
    I have created the code where the change are notified. In the RunL method, each time there is a change, I make
    iTelephony->GetCurrentNetworkInfo(iStatus, iNetworkInfoV1Pckg); to know the new values.

    Well, I need to store theses new values. I have a file, but i don´t know if this action has to go just after GetCurrentNetworkInfo action. So, when a changes happens, the application write new values in the file. Is it correct?

    Some idea? Tanks

    Regards

  7. #7
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    101

    Re: Get Notification Change

    I continue with the same problem but I´m going to make a easier question:

    NetWorkInfo class has an asyncronous method to detect changes of Network information:

    Code:
    void CNetworkInfo::RequestNotification()    {
        _LIT( KNetworkInfoPanic, "CNetworkInfo" );
         __ASSERT_ALWAYS( !IsActive(), User::Panic(KNetworkInfoPanic, 1 ));
        iTelephony->NotifyChange(iStatus, CTelephony::ECurrentNetworkInfoChange, iNwInfoPckg);
        SetActive();
        }
    and when detect a change:
    Code:
    void CNetworkInfo::RunL()
        {if(iStatus==KErrNone)
            {
            iTelephony->GetCurrentNetworkInfo(iStatus, iNwInfoPckg);}
    }
    From the switch of NameAppUi.cpp, how can I call to my NetworkInfo class??????????????


    Thanks!

  8. #8
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    101

    Re: Get Notification Change

    Please, I need help. Trying resolve my last doubt, in exampleAppUi.cpp I have added:
    Code:
    	case ECommand2:
    		{iEvent->Cancel();
    		iEvent->RequestNotification();
    where iEvent is declarated in exampleAppUi.h like CNetworkInfo* iEvent;

    When I run it in the emulator, KERN-EXEC 3 occurs. Please help me. The breakpoints doesn´t run (i don´t know why) and it´s so difficult discover what is the problem.

    THANKS!

  9. #9
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    101

    Re: Get Notification Change

    HELLO??????????????????

  10. #10
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: Get Notification Change

    Hi,

    I'm sorry I cannot response now - I'm on OMA tesfest very busy from 7->21 with all client pre-tests. As soon as I will have a minute I will try to give you a response...

    BR,
    STeN

  11. #11
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    101

    Re: Get Notification Change

    Thanks Stenlik.

  12. #12
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    101

    Re: Get Notification Change

    Any idea??

  13. #13
    (Retired) Nokia Developer Admin.
    Join Date
    Jan 2006
    Location
    Michigan
    Posts
    4,664

    Re: Get Notification Change

    I am moving this to the Symbian C++ Networking and Messaging forum.

    Ron

  14. #14
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: Get Notification Change

    Hi,

    I go slowly over what you have written:

    1/ You have call

    Tel->NotifyChange( aStatus, CTelephony::ECurrentNetworkInfoChange, iNetworkInfoPckg );

    When network parameter changes the RunL() method is called and in iNetworkInfoPckg variable are new network information returned.

    Then in RunL() you call another asynchronous request GetCurrentNetworkInfo(). Why? You already have current parameters in iNetworkInfoPckg . GetCurrentNetworkInfo() has the same parametetr like NotifyChange(), i.e. TNetworkInfoV1. You have the current data - it is not necessary to call anything else.

    2/ Breakpoints not work? Well what you mean? Are you debugging on the device?

    BR
    STeN

  15. #15
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    101

    Re: Get Notification Change

    Thanks Stenlik,

    1) I have to include SetActive() (I don´t know how I have fogotten it!). So in RunL method Can I work with new network values? Like to store them in a file?

    2) I mean Breakpoint doens´t work. I´m debugging on the emulator.

    BYE!

Similar Threads

  1. Profile change notification
    By yogesh.bhople in forum Symbian
    Replies: 6
    Last Post: 2010-08-06, 12:44
  2. Notification for change in battery level
    By venunet in forum Symbian
    Replies: 4
    Last Post: 2009-05-21, 08:43
  3. [announce] Google Directions via PyS60
    By neil.young in forum Symbian
    Replies: 29
    Last Post: 2008-02-15, 10:55
  4. Retrieve the incoming / Outgoing number in S60 V3
    By gpalvia in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 15
    Last Post: 2007-06-15, 19:08
  5. Getting Notification by using CAgnObserver
    By birinder in forum Symbian
    Replies: 2
    Last Post: 2006-03-09, 14:30

Posting Permissions

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