<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - Qns Regarding ActiveViewId ??? - Comments</title>
 <link>http://www.newlc.com/en/forum/qns-regarding-activeviewid</link>
 <description>Comments for &quot;Qns Regarding ActiveViewId ???&quot;</description>
 <language>en</language>
<item>
 <title>Re: Qns Regarding ActiveViewId ???</title>
 <link>http://www.newlc.com/en/forum/qns-regarding-activeviewid#comment-41461</link>
 <description>&lt;p&gt;This is a possible solution:&lt;/p&gt;

&lt;p&gt;Declare a member variable tu store the view when de application is deactivated. And then look into this variable in HandleForegroundL method.&lt;/p&gt;

&lt;p&gt;This would be the code:&lt;br /&gt;
(AppUi.h)&lt;br /&gt;
TVwsViewId iCurentView;&lt;/p&gt;

&lt;p&gt;(AppUi.cpp)&lt;br /&gt;
HandleForegroundEventL(aForeground)&lt;br /&gt;
{&lt;br /&gt;
 if (!aForeground)&lt;br /&gt;
       GetActiveViewId(iCurrentView);&lt;br /&gt;
 else&lt;br /&gt;
 {&lt;br /&gt;
      if(iCurrentView==TUid::Uid(EMyApplicationAppView1Id))&lt;br /&gt;
      {&lt;br /&gt;
      // do something&lt;br /&gt;
      }&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;

&lt;p&gt;I hope this will be helpful for you,&lt;/p&gt;

&lt;p&gt;best regards,&lt;br /&gt;
mopa&lt;/p&gt;</description>
 <pubDate>Thu, 13 Sep 2007 16:56:16 +0200</pubDate>
 <dc:creator>mopa</dc:creator>
 <guid isPermaLink="false">comment 41461 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Qns Regarding ActiveViewId ???</title>
 <link>http://www.newlc.com/en/forum/qns-regarding-activeviewid#comment-41460</link>
 <description>&lt;p&gt;I think that when the HandleForegroundEvent callback is called  GetActiveView  gives KErrNotFound so that means there is no view is active in that moment.&lt;/p&gt;

&lt;p&gt;I dont know how resolve it. I am dealing  with the same problem in this moment.&lt;br /&gt;
Any ideas?&lt;/p&gt;

&lt;p&gt;Best regards,&lt;br /&gt;
mopa&lt;br /&gt;
 &lt;/p&gt;</description>
 <pubDate>Thu, 13 Sep 2007 16:34:01 +0200</pubDate>
 <dc:creator>mopa</dc:creator>
 <guid isPermaLink="false">comment 41460 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Qns Regarding ActiveViewId ???</title>
 <link>http://www.newlc.com/en/forum/qns-regarding-activeviewid#comment-41408</link>
 <description>&lt;p&gt;hi jp,&lt;br /&gt;
plz check ur PMesaage.&lt;/p&gt;</description>
 <pubDate>Wed, 12 Sep 2007 12:44:52 +0200</pubDate>
 <dc:creator>chandantheracer</dc:creator>
 <guid isPermaLink="false">comment 41408 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Qns Regarding ActiveViewId ???</title>
 <link>http://www.newlc.com/en/forum/qns-regarding-activeviewid#comment-41406</link>
 <description>&lt;p&gt;Hi Chandan,&lt;/p&gt;

&lt;p&gt;AFAIK, once your application goes into background, it will not receive events the same way  as it receives when it is in foreground.&lt;/p&gt;

&lt;p&gt;Once your application goes in background, none of the views in your application will be the current view.&lt;/p&gt;

&lt;p&gt;I think you have to first bring your application to Foreground (by clicking on its Menu icon) and then your application&#039;s currently active view can be identified.&lt;/p&gt;

&lt;p&gt;If possible elaborate on what exact functionality you want, then maybe i can help more.&lt;br /&gt;
&lt;/p&gt;</description>
 <pubDate>Wed, 12 Sep 2007 12:04:11 +0200</pubDate>
 <dc:creator>jp4symbian</dc:creator>
 <guid isPermaLink="false">comment 41406 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Qns Regarding ActiveViewId ???</title>
 <link>http://www.newlc.com/en/forum/qns-regarding-activeviewid#comment-41366</link>
 <description>&lt;p&gt;hi srikanth,&lt;br /&gt;
I m confused now.... plz take a look to reply now by someone in forum nokia.. links is :- &lt;a href=&quot;http://discussion.forum.nokia.com/forum/showthread.php?p=341820#post341820&quot;&gt;http://discussion.forum.nokia.com/forum/showthread.php?p=341820#post341820&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and also if work on foreground and background also then in my app its not working correctly, plz clearify me  .. code is here :-&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;TVwsViewId viewId1;&lt;br /&gt; CEikonEnv::Static()-&amp;gt;EikAppUi()-&amp;gt;GetActiveViewId(viewId1 );&lt;br /&gt;&lt;br /&gt;if(viewId.iViewUid==TUid::Uid(EMyApplicationAppView1Id))&lt;br /&gt;{&lt;br /&gt;// do something&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;font-weight:bold&quot;&gt;when my app is in foreground control comes inside if but it not comes when app is in backgroud&lt;/span&gt;&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 12 Sep 2007 12:00:03 +0200</pubDate>
 <dc:creator>chandantheracer</dc:creator>
 <guid isPermaLink="false">comment 41366 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Qns Regarding ActiveViewId ???</title>
 <link>http://www.newlc.com/en/forum/qns-regarding-activeviewid#comment-41389</link>
 <description>&lt;p&gt;If you see the documentation it says &quot;Gets the ID of the app UI&#039;s currently active view&quot;. It says app Ui and not phone UI. This means it should give the active view id of the application irrespective of it being in foreground or background. Though I havent tried this.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br /&gt;
Sri&lt;/p&gt;</description>
 <pubDate>Wed, 12 Sep 2007 05:53:42 +0200</pubDate>
 <dc:creator>srikanth</dc:creator>
 <guid isPermaLink="false">comment 41389 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Qns Regarding ActiveViewId ???</title>
 <link>http://www.newlc.com/en/forum/qns-regarding-activeviewid#comment-41363</link>
 <description>&lt;p&gt;AFAIK it returns the active viewid in an application in which GetActiveViewId is called. There shouldnt be any change whether the app is in foreground or background.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br /&gt;
Sri&lt;/p&gt;</description>
 <pubDate>Tue, 11 Sep 2007 11:11:41 +0200</pubDate>
 <dc:creator>srikanth</dc:creator>
 <guid isPermaLink="false">comment 41363 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Qns Regarding ActiveViewId ???</title>
 <link>http://www.newlc.com/en/forum/qns-regarding-activeviewid#comment-41362</link>
 <description>&lt;p&gt;I m still waiting for someone reply, can anybody help plz ?&lt;br /&gt;
&lt;/p&gt;</description>
 <pubDate>Tue, 11 Sep 2007 10:59:04 +0200</pubDate>
 <dc:creator>chandantheracer</dc:creator>
 <guid isPermaLink="false">comment 41362 at http://www.newlc.com</guid>
</item>
<item>
 <title>Qns Regarding ActiveViewId ???</title>
 <link>http://www.newlc.com/en/forum/qns-regarding-activeviewid</link>
 <description>&lt;p&gt;hi,&lt;br /&gt;
I want to know that GetActiveViewId() methods return ActiveViewId when App is in ForeGround or also when App is in Background ???&lt;/p&gt;

&lt;p&gt;just use like this :&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;GetActiveViewId(aViewId);&lt;br /&gt;if(aViewId.iViewUid==TUid::Uid(EMyApplicationAppView1Id))&lt;br /&gt;{&lt;br /&gt; // do something&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/en/forum/qns-regarding-activeviewid&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/en/forum/qns-regarding-activeviewid#comments</comments>
 <category domain="http://www.newlc.com/en/forums/symbian-c">Symbian C++</category>
 <pubDate>Sun, 09 Sep 2007 15:00:27 +0200</pubDate>
 <dc:creator>chandantheracer</dc:creator>
 <guid isPermaLink="false">18904 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
