FullscreenView get unloaded/destroyed when idle for a long time

91115 Oct 2011 7:37 PM
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
91115 Oct 2011 9:35 PM
One more thing I want to add. The reason that I don&#39;t want my view got unloaded/destroyed is that when the views were unloaded/destroyed, those views are unusable (they don&#39;t work as expected). Will the KONtx framework automatically reload my views or I have to do it manually?<br>Some guidelines are much appreciated!<br><br>Tinh
Vivek Jani17 Oct 2011 5:32 AM
The unused/idle views will get unloaded automatically as part of garbage collection. You don&#39;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.<br><br>Thanks,<br>Vivek
91117 Oct 2011 9:07 PM
Hi Vivek,<br><br>I&#39;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&#39;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.<br>I develop a simple application to demonstrate that behavior. You can download it here.&nbsp;<a>http://dl.dropbox.com/u/1059802/tv.rallypoint.samsung.widget.zip</a><br>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.<br><br>If you need more information, I will provide as much as I can.<br><br>Many thanks,<br>Tinh<br><br><div class="quote "><div class="quotetop ">QUOTE<cite>(Vivek Jani @ 17 Oct 2011 5:32 AM)</cite><blockquote class="quotemain">The unused/idle views will get unloaded automatically as part of garbage collection. You don&#39;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.<br><br>Thanks,<br>Vivek</blockquote></div></div>