×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    MCoeViewObserver

    Hi,

    MCoeViewObserver is an interesting class. Can it be used to observe view activation/deactivation on the S60 device?

    I have written a small app which tries to do this. But on a view switch it does not hit HandleViewEventL().

    Is this functionality not available in S60? Does the Application need to derived from CAknViewAppUi to receive the notifications? What are the preconditions to use this class?

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: MCoeViewObserver

    Hi,

    I changed my small test app into a CAknViewAppUi application with a single view (which ensures my application is registered with the view server). The callbacks are implemented in my view. None of these callbacks are invoked when I switch views in the emulator (S60 3rd FP2 SDK). Any ideas?

    Here is the list callbacks that I am using:

    public: // from MCoeViewObserver
    void HandleViewEventL( const TVwsViewEvent& aEvent );

    public: // from MCoeViewActivationObserver
    void HandleViewActivation(
    const TVwsViewId& aNewlyActivatedViewId,
    const TVwsViewId& aViewIdToBeDeactivated );

    public: // from MCoeViewDeactivationObserver
    void HandleViewDeactivation(
    const TVwsViewId& aViewIdToBeDeactivated,
    const TVwsViewId& aNewlyActivatedViewId );

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  3. #3
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: MCoeViewObserver

    I made some tests in the past, basically to get a common layer for sx0 and uiq devices. You can see some of it here, maybe it can give you some ideas

  4. #4
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: MCoeViewObserver

    Hi David,

    OK - thanks - I see you try have a common source for UIQ and S60 in your app. I would be interested to get notified about view switches between built-in applications on the phone (only S60).

    Nonetheless your approach is interesting and maybe I should try to go at a lower level than just these callbacks, but this will take too much time for the moment.

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  5. #5
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: MCoeViewObserver

    Hi,

    I now modified my view-based application to have 2 views. Even if I switch internally within my own application between the views (which works fine) I not get any calls to the callbacks I have implemented. The callbacks are implemented in both views.

    My conclusion is MCoeViewDeactivationObserver, MCoeViewActivationObserver and MCoeViewObverser all classes only supported in Symbian OS, not in Series 60.

    Anyone feel like adding some more info to this topic?

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  6. #6
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: MCoeViewObserver

    Hi Rene,

    Interesting if these allowed to observer any view switch, not just the ones in your app. It looks like these were introduced in 3rd fp1..

    Looks like CCoeAppUi::AddViewObserverL() is what you're looking for? See coeaui.h in the sdk.. there are some related and interesting new functions.. In case this failed, check for some capability related error..

  7. #7
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: MCoeViewObserver

    Hi David,

    thanks for the hint. I forgot to check that. It works. But I only receive events for view switches within my own application or view switches from my application to other applications and backwards. I cannot observe all the view switches which happen in the system.

    Maybe NotifyNextActivation() is a interesting method? I will try to sort out what this is supposed to do.

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  8. #8
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: MCoeViewObserver

    Hi,

    very nice! - with NotifyNextActivation() I can watch view switches in other applications. In my case I can observe if the user switches from the main view to the message view in the message center application.

    If at the same time you implemented HandleViewEventL for the observer you will get a TVwsViewEvent object as parameter as a result of the view switch. Unfortunately at least in my case the custom message ID and length are always 0.

    This reduces my problem. Actually I want to know if the user is navigating inside the messsage application to my mailbox (I have written a MTM).

    I will continue/start a new thread for this in the network/messaging area.

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  9. #9
    Registered User
    Join Date
    Mar 2003
    Location
    Luttenberg (Netherlands)
    Posts
    577

    Re: MCoeViewObserver

    Hi,

    discussion on my specific problem continues in http://discussion.forum.nokia.com/fo...236#post445236

    BR,

    Rene
    Rene Heuven
    Inmote - Creative Smartphone Solutions
    Web: www.inmote.com
    E-mail: rene@inmote.com

  10. #10
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: MCoeViewObserver

    Cool you could find something, and thanks for sharing it.

Posting Permissions

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