×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    50

    Question DIsplay a window over the incoming call window on N85

    Hi,
    I wrote an application that displays an animation over the incoming call window.

    I successfully checked it compatibility with various devices -
    3rd edition v9.1 - N73
    3rd edition v9.2 - N95, N95 8GB, 6120
    3rd edition v9.3 - 6210, N78

    The animation works fine on all of them, but when I test it on N85 the incoming call window hides mine and throws it to the background, like it has a higher priority.

    At first I tested it on a device on RDA, so I thought that the problem is with that specific device, but I was able to put my hands on N85 device and the result was the same.


    The application runs as a daemon (without CEikonEnv) and uses background buffer.
    This is the code I use to create the window:
    Code:
    	setApplicationPath();
    
    	User::LeaveIfError(iWsSession.Connect());
    
    	iScreenDevice = new (ELeave) CWsScreenDevice(iWsSession);
    	User::LeaveIfError(iScreenDevice->Construct());
    	User::LeaveIfError(iScreenDevice->CreateContext(iWindowGc));
    
    	iWindowGroup=RWindowGroup(iWsSession);
    	User::LeaveIfError(iWindowGroup.Construct((TUint32)&iWindowGroup, EFalse));
    
    	int winPriErr = iWindowGroup.SetOrdinalPositionErr(0, ECoeWinPriorityAlwaysAtFront);
    
    	iWindowGroup.EnableReceiptOfFocus(EFalse);
    
    	CApaWindowGroupName* winGroupName=CApaWindowGroupName::NewLC(iWsSession);
    
    	winGroupName->SetHidden(EFalse);
    	winGroupName->SetWindowGroupName(iWindowGroup);
    	CleanupStack::PopAndDestroy();
    
    	iWindow=RWindow(iWsSession);
    	User::LeaveIfError(iWindow.Construct(iWindowGroup, (TUint32)&iWindow));
    	iWindow.SetNonTransparent();
    
    
    	iWindow.EnableVisibilityChangeEvents();
    	iWindow.SetVisible(ETrue);
    
    	int winWidth = 240;
    	int winHeight = 120;
    	m_pWindowSize = new TSize(winWidth, winHeight);
    	m_pPosition = new TPoint(0, 80);
    	m_pDrwRect = new TRect(TPoint(0, 0), *m_pWindowSize);
    
    	
    	iWindow.SetExtent(*m_pPosition, *m_pWindowSize);
    	iWindow.SetBackgroundColor(KRgbBlack);
    	iWindow.SetNonFading(true);
    	iWindow.SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront);
    	iWindow.Activate();
    
    	
    	// create back buffer objects
    	m_pBackBufferBitmap = new(ELeave) CFbsBitmap();
    	TDisplayMode aDisplayMode = iScreenDevice->DisplayMode();
    	User::LeaveIfError(m_pBackBufferBitmap->Create(*m_pWindowSize, aDisplayMode) );
    
    	m_pBackBufferDevice = CFbsBitmapDevice::NewL(m_pBackBufferBitmap);
    	User::LeaveIfError(m_pBackBufferDevice->CreateContext(m_pBackBufferGc));
    
    	m_pBackBufferGc->SetBrushColor(TRgb(0));
    	m_pBackBufferGc->SetBrushStyle(CGraphicsContext::ENullBrush);

    Does anyone see the problem or knows about anything different with N85 devices?

    Regards,
    Asaf.

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

    Re: DIsplay a window over the incoming call window on N85

    you could try with priority ECoeWinPriorityAlwaysAtFront + 100 maybe..

  3. #3
    Regular Contributor
    Join Date
    Mar 2007
    Posts
    103

    Question DIsplay a window over the incoming call window on N85

    I also have this problem unsolved, so I'll try to refine it:

    I took the Symbian HelloWorldBasic example application and changed its ConstructL function as follows:


    Code:
     void CHelloWorldBasicAppView::ConstructL( const TRect& aRect )
        {
        // Create a window for this application view
        CreateWindowL();
    
        //////   My addition:
        CEikonEnv::Static()->RootWin().SetOrdinalPosition(0,ECoeWinPriorityAlwaysAtFront);
        Window().SetOrdinalPosition(0,ECoeWinPriorityAlwaysAtFront);
        //////
     
        // set the font
        iFont = AknLayoutUtils::FontFromId(EAknLogicalFontPrimaryFont);
    
        iText.Zero();
    
        // Set the windows size
        SetRect( aRect );
    
        // Activate the window, which makes it ready to be drawn
        ActivateL();
        }

    On all the phones I tested it (pretty much the same as the list in the initial post), the incoming call window hides behind the HelloWorldBasic application main window and only on N85 it is thrown to the background.

    So the question remains: does anyone see the problem or knows about anything different with N85 devices?

    Dudi.
    Last edited by dudi; 2009-02-04 at 08:14.

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

    Re: DIsplay a window over the incoming call window on N85

    Not really, but as you are using application framework, just add focus monitoring into your appui class, and go back to front if somebody kicks you out from it..

  5. #5
    Regular Contributor
    Join Date
    Mar 2007
    Posts
    103

    Re: DIsplay a window over the incoming call window on N85

    Quote Originally Posted by symbianyucca View Post
    you could try with priority ECoeWinPriorityAlwaysAtFront + 100 maybe..
    What is the max priority?

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

    Re: DIsplay a window over the incoming call window on N85

    Dunno really, I would assume it could be maximum on TInt maybe, anyway you can give more than ECoeWinPriorityAlwaysAtFront atleast.

  7. #7
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: DIsplay a window over the incoming call window on N85

    Hi,

    Try this , this might work
    iMyWindowG = RWindowGroup( iCoeEnv->WsSession() );
    iMyWindowG.SetOrdinalPosition(1, ECoeWinPriorityAlwaysAtFront+1);

    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  8. #8
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    50

    Re: DIsplay a window over the incoming call window on N85

    OK, I solved it - priority ECoeWinPriorityAlwaysAtFront + 100 worked, but it means that now my application requires SwEvent capability...


    mateen_maldar - thnaks for your reply, but my application runs as a daemon so iCoeEnv is not accessible.

    Thanks guys,
    Asaf Pinhassi.

Similar Threads

  1. Replies: 8
    Last Post: 2008-12-03, 02:25
  2. Replies: 3
    Last Post: 2008-09-05, 10:54
  3. Error while accepting an incoming call
    By yogesh14 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2006-03-23, 03:55
  4. Replies: 0
    Last Post: 2004-03-24, 08:40
  5. Replies: 0
    Last Post: 2003-12-03, 03:34

Posting Permissions

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