×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Jun 2007
    Posts
    52

    Weird behaviour with HandleForegroundEventL

    Hi All,
    I have an App which runs in background when user presses Hide option let's consider on View1.
    Next time,when user opens my App I don't want to show again View1 instead i want to show View2 based on some condition.For this i am overriding the AppUI method called 'HandleForegroundEventL' as specified in below link.

    http://www.newlc.com/en/Moving-an-ap...to.html?page=1

    Im also posting actual code for quick reference

    Code:
    void CMyAppUi::HandleForegroundEventL(TBool aForeground)
    {
     // Call Base class method
     CAknAppUi::HandleForegroundEventL(aForeground);
    
     if(aForeground)
     {
         Activating View2.
     }
     else
     {
        //Nothing to do
     }
    }
    As I expected everything working fine when i checked on Emulator,But when i check this on device it's behaving very differently.Means From other views(Ex: View3) when i click on any option which makes http connection,instead displaying connecting bar It's displaying the View2 (which im trying to display in HandleForegroundEventL method of when Focus True).and after some time Application getting crashed with KERN-EXEC 3(Which is null reference.)

    So I am unable to find out what may be the problem,One of my guess is that when it comes to Emulator im connecting to Local IP which is not displaying any connecting bar on emulator but when it comes to Mobile the same IP becomes Global IP which needs to connect through GPRS by displaying connecting bar which makiing focus to change.

    Will it may be a actual problem or some thing else wrong in this?

    Please help in solving this.

    Thanks in advance.

  2. #2
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    77

    Re: Weird behaviour with HandleForegroundEventL

    Yes, the problem is what you predicted.
    When rogressbar comes your application goes in background, when it destroyed you will get an foreground event and your view is switched.

  3. #3
    Regular Contributor
    Join Date
    Jun 2007
    Posts
    52

    Re: Weird behaviour with HandleForegroundEventL

    will the Application goes background only on connection bar or any other things that makes Application into background.

    So How can i solve this then,please suggest any solutions to fix this issue.

  4. #4
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    77

    Re: Weird behaviour with HandleForegroundEventL

    Yes it can happen on many cases, like after bettry full, charger connected or long pressed menu to wakeup task list.

    I think, there is no solution for it in sdk. You might need to handle yourself how the aplications window groups are changing.
    See RWsSession , RWindowGroup classes and relative events.

Similar Threads

  1. Weird behaviour after firmware upgrade
    By mikfi in forum Symbian
    Replies: 0
    Last Post: 2006-10-23, 17:55
  2. NACK weird behaviour
    By gfk_75 in forum General Messaging
    Replies: 0
    Last Post: 2005-12-16, 11:49
  3. weird CANCEL button behaviour
    By securityfocus in forum Symbian
    Replies: 0
    Last Post: 2005-03-18, 14:24
  4. Replies: 0
    Last Post: 2005-03-04, 10:52
  5. Weird Behaviour in Printf
    By LAS__VEGAS in forum Symbian
    Replies: 2
    Last Post: 2005-02-26, 18:10

Posting Permissions

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