×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    6

    Question signal strength/ctelephony

    hi,

    I would like an application to get the current value of signal strength in the mobile. I have seen that this can be achieved with the class ctelephony from symbian, any application that can be done and move to mobile?

    thanks

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: signal strength/ctelephony

    Have you checked the Wiki for exmaples already: http://wiki.forum.nokia.com/index.ph...ith_CTelephony

  3. #3
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: signal strength/ctelephony


  4. #4
    Registered User
    Join Date
    Dec 2008
    Posts
    6

    Re: signal strength/ctelephony

    hi,
    thanks for the links. I used the code of "Measuring signal strength using CTelephony"
    and now I don't know where to find the values of signal strength, where the package TSignalStrength is saved.
    Can I see the results in the emulator? How?

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: signal strength/ctelephony

    Quote Originally Posted by belita View Post
    hi,
    thanks for the links. I used the code of "Measuring signal strength using CTelephony"
    and now I don't know where to find the values of signal strength, where the package TSignalStrength is saved.
    Can I see the results in the emulator? How?
    Use the another article instead: Monitoring signal strength with CTelephony

    It is implemented as Active Object. After issuing asynchronous service GetSignalStrength, you will be notified in the RunL method. There you will get results into iSignalStrength and iBar. This is what you are looking for.

    PS: Emulator is not a phone, hence it does not have SIM card in it, thus it is not connected with real network. So you cannot retrieve such information on emulator. You should better try on real device.

    All the best.
    Nokia Developer Wiki Moderation team

  6. #6
    Registered User
    Join Date
    Dec 2008
    Posts
    6

    Re: signal strength/ctelephony

    hi! I used the code of the article "Monitoring signal strength with CTelephony" as you said me. Also I have put in AppUi.h class Cproyecto2AppUi: public CAknAppUi
    {
    .
    .
    void SignalStatus (TInt32 aStrength, TInt8 aBars);
    .
    .
    }
    Too I added:


    CNwSignalCheck * iNwSignalCheck;

    and later:

    delete iNwSignalCheck;


    I want to display on screen the values stored in signalstrength and for this I put a new case in the function "HandleCommandL" but I don't know the parameters to pass to the function.
    how can I do?

    thank you very much for the help!

  7. #7
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: signal strength/ctelephony

    In this example, observer pattern has been used. SignalStatus is a callback function and you will get notification in the registered class.

    Let me explain it in more detail:

    1 )You need to inherit mixin class in, let's say, AppUi class, as follows:

    Code:
    class Cproyecto2AppUi: public CAknAppUi, public MNwSignalObserver
    {
    
    // From MNwSignalObserver
    public: 
    void SignalStatus(TInt32 aStrength,TInt8 aBars);
    ...
    ...
    };
    2) You have to give implementation of SignalStatus in your AppUI.cpp file

    Code:
    // You will automatically get notification in the following function from RunL() from CNwSignalCheck as shown in the article.
    void Cproyecto2AppUi::SignalStatus(TInt32 aStrength,TInt8 aBars)
    {
    ...
    }
    3) You need to instantiate CNwSignalCheck object and register your class for an observer so that that class will receive notification.

    Code:
    void Cproyecto2AppUi::ConstructL()
    {
          iNwSignalCheck = new (ELeave) CNwSignalCheck(*this); // Register AppUI class as an interested party for receiving notification
    ...
    ...
    }
    4) Call GetSignalInfo() from wherever you wish. Let's say from HandleCommandL

    Code:
    void Cproyecto2AppUi::HandleCommandL(TInt aCommand)
    {
    ...
    ...
           case ECommand1:
                iNwSignalCheck->GetSignalInfo();
                break;
    ...
    }
    5) You will automatically get notification in your SignalStatus which we implemented in step 2)

    6) Delete iNwSignalCheck in the destructor.
    Code:
    Cproyecto2AppUi::~Cproyecto2AppUi()
    	{
    	if (iNwSignalCheck)
    		{
    		delete iNwSignalCheck;
    		iNwSignalCheck= NULL;
    		}
    ....
    ....
    	}
    That's it. I hope that will help you. Let me know if you still have any confusion.
    Nokia Developer Wiki Moderation team

  8. #8
    Registered User
    Join Date
    Dec 2008
    Posts
    6

    Re: signal strength/ctelephony

    thank you so much. This is very useful to me.
    Until next week I can not see the results in a real mobile, so I don't know if actually shown on screen the signalstrength.

    I have got two warnings, so my only question is: Do I have to make the function "signalstatus" or no implementation required in AppUi.cpp? if I have to make, where can i find? is it in any library?

  9. #9
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: signal strength/ctelephony

    you need to implement the "signalstatus", since it is the callback which with you are given the values from the monitoring class.

  10. #10
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: signal strength/ctelephony

    Quote Originally Posted by belita View Post
    I have got two warnings, so my only question is: Do I have to make the function "signalstatus" or no implementation required in AppUi.cpp? if I have to make, where can i find? is it in any library?
    See, I have explained it step by step and as already said by Jukka, it is a callback function and you need to implement it anyhow. Because you inherit from MNwSignalObserver class which has that method as pure virtual and hence you have to implement it.

    By the way I don't understand(like) why did you ask the same question again in some other thread while you are already getting reply in this thread!!!
    Nokia Developer Wiki Moderation team

  11. #11
    Registered User
    Join Date
    Nov 2008
    Location
    Cairo-Egypt
    Posts
    80

    Re: signal strength/ctelephony

    hi
    i have made it but have to finish

    here the event of press a menu opton

    TBool CLUILBHCISContainerView::HandleSignal_StrengthMenuItemSelectedL( TInt aCommand )
    {


    iNwSignalCheck->GetSignalInfo();
    _LIT(x,"Signal Strenght is : ");

    TBuf<30>y(x);
    y.AppendNum(iStrength);


    iEikonEnv->AlertWin(y);




    // TODO: implement selected event handler
    return ETrue;
    }

    and i have declare iStrength as public and the implementation of the SignalStatus

    void CLUILBHCISContainerView::SignalStatus(TInt32 aStrength,TInt8 aBars)
    {
    iStrength = aStrength;
    iBars = aBars;
    }
    but when i run emulator and choose the menu option the programm is terimnated and a message say App. Closed: appear

    what i have to do?

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

    Re: signal strength/ctelephony

    Quote Originally Posted by zohirey2
    i have made it but have to finish
    What you made and what you want to finish???

    First of all check what is the pacnic code.
    http://wiki.forum.nokia.com/index.ph...ded_panic_code

    Second you can try working example from wiki (i guess you are trying to get signal strength).
    http://wiki.forum.nokia.com/index.ph...ith_CTelephony

  13. #13
    Registered User
    Join Date
    Nov 2008
    Location
    Cairo-Egypt
    Posts
    80

    Re: signal strength/ctelephony

    i still can't solve this problem

    TBool CLUILBHCISContainerView::HandleMenuItemSelectedL( TInt aCommand )
    {

    iNwSignalCheck->GetSignalInfo();

    // TODO: implement selected event handler
    return ETrue;
    }

    the application is closed and show me a message
    App. closed:
    LULBHCIS

    i saw saw article
    http://wiki.forum.nokia.com/index.ph...ded_panic_code
    but
    my emulator refused to show Tools -> Preferences

    when i disable the line code


    iNwSignalCheck->GetSignalInfo();

    the program work so good when chose blank option menu!

  14. #14
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: signal strength/ctelephony

    Yes, I well received your e-mail just now.

    Quote Originally Posted by zohirey2 View Post
    the application is closed and show me a message
    App. closed:
    LULBHCIS
    My utmost guess would be KERN-EXEC 3 panic.


    Quote Originally Posted by zohirey2 View Post
    but
    my emulator refused to show Tools -> Preferences
    Check this: http://wiki.forum.nokia.com/index.ph...ge_in_emulator

    Solution: Have you instantiated iNwSignalCheck somewhere prior to calling its function? Please show the code where you have instantiated the class object iNwSignalCheck.
    Nokia Developer Wiki Moderation team

  15. #15
    Registered User
    Join Date
    Nov 2008
    Location
    Cairo-Egypt
    Posts
    80

    Re: signal strength/ctelephony

    ok
    all what i have done is:
    1-declare
    void SignalStatus(TInt32 aStrength, TInt8 aBars);

    CNwSignalCheck* iNwSignalCheck;
    in the LUILBHCISContainerView.h
    and then
    2-implement the function SignalStatus
    in LUILBHCISContainerView.cpp
    as follow
    void CLUILBHCISContainerView::SignalStatus(TInt32 aStrength, TInt8 aBars)
    {
    TBuf<30>m;
    _LIT(n,"Signal Strength: ");

    m.Append(n);
    m.AppendNum(aStrength);

    iLUILBHCISContainer->Set1(m);




    }
    3- i call the function as follow
    iNwSignalCheck->GetSignalInfo();

    in the event of chossing some option menu

    only this
    what can i do??

    KERN-EXEC 3
    this is the panic

Similar Threads

  1. N73 signal problem
    By Degeneratemoo in forum General Development Questions
    Replies: 2
    Last Post: 2007-10-01, 11:30
  2. SMS-send problem during loss os signal
    By novis in forum Symbian
    Replies: 2
    Last Post: 2007-05-28, 12:38
  3. N70 No Signal -- HELP!
    By jaofiaza in forum General Development Questions
    Replies: 5
    Last Post: 2006-09-26, 09:43
  4. Attenuating/Limiting Bluetooth Signal
    By stevenjames in forum Bluetooth Technology
    Replies: 3
    Last Post: 2006-03-21, 06: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
  •  
×