0

FullscreenView get unloaded/destroyed when idle for a long time

Hi,
I'm developing a TV widget which contains a SidebarView and a FullscreenView. When I leave the widget for a long time (about 10-15 minutes), I saw in the log of the simulator terminal that my sidebar view and my fullscreen view were unloaded. Here is the log:
WM 00:05:12:239: [T:1742] [KONtx/Rallycast Fantasy] {SidebarViewTest-2} :: _onUnloadView
WM 00:05:12:239: [T:1742] [KONtx/Rallycast Fantasy] {SidebarViewTest-2} :: destroyView
WM 00:06:12:258: [T:1742] [KONtx/Rallycast Fantasy] {HostEventManager} :: Got HostEvent:  onUnloadView
WM 00:06:12:259: [T:1742] [KONtx/Rallycast Fantasy] {SnippetViewTest-1} :: _onUnloadView
WM 00:06:12:259: [T:1742] [KONtx/Rallycast Fantasy] {SnippetViewTest-1} :: destroyView
WM 00:15:12:671: [T:1742] [KONtx/Rallycast Fantasy] {HostEventManager} :: Got HostEvent:  onHideView
WM 00:16:12:367: [T:1742] [KONtx/Rallycast Fantasy] {HostEventManager} :: Got HostEvent:  onUnloadView
WM 00:16:12:367: [T:1742] [KONtx/Rallycast Fantasy] {MainViewTest-6} :: _onUnloadView
WM 00:16:12:367: [T:1742] [KONtx/Rallycast Fantasy] {MainViewTest-6} :: destroyView

So my question is: why are my views unloaded? How can I prevent them from being unloaded/destroyed?

Any input are welcome!
Many thanks in advance,
Tinh

by
3 Replies
  • One more thing I want to add. The reason that I don't want my view got unloaded/destroyed is that when the views were unloaded/destroyed, those views are unusable (they don't work as expected). Will the KONtx framework automatically reload my views or I have to do it manually?
    Some guidelines are much appreciated!

    Tinh
    0
  • The unused/idle views will get unloaded automatically as part of garbage collection. You don't need to actually worry about this typically since normally the views which get destroyed are the ones which the user was not using currently and if you go back to the same view again, it will be reloaded again.

    Thanks,
    Vivek
    0
  • Hi Vivek,

    I'm sorry for not being clear in my initial question, the reason I asked because it caused me problem! :). After my fullscreen view got unloaded, I can barely do anything with the widget, I've got a black screen and the widget does not response to any key press (I have color key handlers setup in the my fullscreen view), the color key handlers were not called at all. At that time, I have to press the Home button (from the Simulator) to return to the widget docks, re-select my widget and return to my fullscreen view. Now the color key handler get called, but all the GUI element does not work.
    I develop a simple application to demonstrate that behavior. You can download it here. http://dl.dropbox.com/u/1059802/tv.rallypoint.samsung.widget.zip
    Note: on the simulator, my fullscreen view got unloaded after about 10-15 minutes, but on the Vizio TV, it took about about 2 hours (idle time) to get unloaded.

    If you need more information, I will provide as much as I can.

    Many thanks,
    Tinh

    QUOTE(Vivek Jani @ 17 Oct 2011 5:32 AM)
    The unused/idle views will get unloaded automatically as part of garbage collection. You don't need to actually worry about this typically since normally the views which get destroyed are the ones which the user was not using currently and if you go back to the same view again, it will be reloaded again.

    Thanks,
    Vivek
    0

Recent Posts

in General - Yahoo! TV Widgets