<?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 - How to detect if an application is launched by user or the startup list - Comments</title>
 <link>http://www.newlc.com/How-to-detect-if-an-application-is.html</link>
 <description>Comments for &quot;How to detect if an application is launched by user or the startup list&quot;</description>
 <language>en</language>
<item>
 <title>Re: How to</title>
 <link>http://www.newlc.com/How-to-detect-if-an-application-is.html#comment-47961</link>
 <description>&lt;p&gt;Hi, can you do the same thing for EXEs withoug a GUI? I do not know how to access the opaque data without AppUi and in turn I do not know how to set command line parameters from app registration resource that could be read with User::CommandLine() for example. Thanks, J.&lt;/p&gt;</description>
 <pubDate>Fri, 08 Aug 2008 13:02:35 +0200</pubDate>
 <dc:creator>MrTJ</dc:creator>
 <guid isPermaLink="false">comment 47961 at http://www.newlc.com</guid>
</item>
<item>
 <title>How to detect if an application is launched by user or the start</title>
 <link>http://www.newlc.com/How-to-detect-if-an-application-is.html#comment-2755</link>
 <description>&lt;div class=&quot;spip-content&quot;&gt;&lt;p class=&quot;spip&quot;&gt;Good :-)&lt;/p&gt;

&lt;p class=&quot;spip&quot;&gt;Anyway, my results agree with what Pawel says - I can&#039;t get his code using GetCommandLineFromProcessEnvironment in the AppUi&#039;s ConstructL to work (although the same code worked fine in a console app and detected the presence or not of the opaque data) but your code in ProcessCommandParametersL works OK.&lt;/p&gt;

&lt;p class=&quot;spip&quot;&gt;I&#039;ve tried this on S60 3rd SDK and on an N73 with the same results.&lt;/p&gt;

&lt;p class=&quot;spip&quot;&gt;I&#039;m puzzled by this - must confess I don&#039;t really understand the data flow here - where does GetCommandLineFromProcessEnvironment fish the data up from - could be from RProcess but I don&#039;t see any opaque data associated with an RProcess???&lt;/p&gt;

&lt;p class=&quot;spip&quot;&gt;Anyway, Eric&#039;s solution is working well for me now, thanks.&lt;/p&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 14 Feb 2007 21:10:48 +0100</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 2755 at http://www.newlc.com</guid>
</item>
<item>
 <title>How to detect if an application is launched by user or the start</title>
 <link>http://www.newlc.com/How-to-detect-if-an-application-is.html#comment-2756</link>
 <description>&lt;div class=&quot;spip-content&quot;&gt;If it is not stipulated, then the answer is probably no. We have just signed an application which uses this trick and which cannot be disabled at autostart (there is just no API to do this right now !).&lt;/div&gt;</description>
 <pubDate>Tue, 13 Feb 2007 21:27:54 +0100</pubDate>
 <dc:creator>eric</dc:creator>
 <guid isPermaLink="false">comment 2756 at http://www.newlc.com</guid>
</item>
<item>
 <title>How to detect if an application is launched by user or the start</title>
 <link>http://www.newlc.com/How-to-detect-if-an-application-is.html#comment-2754</link>
 <description>&lt;div class=&quot;spip-content&quot;&gt;&lt;p class=&quot;spip&quot;&gt;Hello Eric,&lt;/p&gt;

&lt;p class=&quot;spip&quot;&gt;This is very useful information, thanks.&lt;/p&gt;

&lt;p class=&quot;spip&quot;&gt;But is it true that an app which autostarts needs to have an autostart-disable mechanism to be able to pass Symbian Signed? I&#039;ve just read through the Symbian Signed Test Criteria and I didn&#039;t see this stipulation there.&lt;/p&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 13 Feb 2007 16:11:42 +0100</pubDate>
 <dc:creator>jabber</dc:creator>
 <guid isPermaLink="false">comment 2754 at http://www.newlc.com</guid>
</item>
<item>
 <title>How to detect if an application is launched by user or the start</title>
 <link>http://www.newlc.com/How-to-detect-if-an-application-is.html#comment-2753</link>
 <description>&lt;div class=&quot;spip-content&quot;&gt;hi,
I implemented this code but got a problem i.e; i have to press red button to end my splash screen and &#039;ve to launch application again..what i did? i checked if application is launching by user click then i started my splash screen which does not end. but if i start my splash screen from AppUi ConstructL, then it goes fine. but when i did like this in ProcessCommandParametersL;
if(aCommandLine.OpaqueData().Length() &gt; 0)
  	  iSplashActiveObject-&gt;StartNow(EFalse);
  else
	  iSplashActiveObject-&gt;StartNow(ETrue);
i cant move from splash..app.hangs.&lt;/div&gt;</description>
 <pubDate>Thu, 01 Feb 2007 14:27:20 +0100</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 2753 at http://www.newlc.com</guid>
</item>
<item>
 <title>How to detect if an application is launched by user or the start</title>
 <link>http://www.newlc.com/How-to-detect-if-an-application-is.html#comment-2752</link>
 <description>&lt;div class=&quot;spip-content&quot;&gt;AppUi::ConstructL is called before the AppUi::ProcessCommandParametersL and it is EIKENV which is responsible for this. There is not much done between the two and definitely nothing related with construction of the command line. So I do not see any reason why it shouldn&#039;t work in the AppUI::ConstructL !
(checked with a Symbian 8 devkit - so this might have changed in v9).&lt;/div&gt;</description>
 <pubDate>Wed, 03 Jan 2007 13:00:32 +0100</pubDate>
 <dc:creator>eric</dc:creator>
 <guid isPermaLink="false">comment 2752 at http://www.newlc.com</guid>
</item>
<item>
 <title>How to detect if an application is launched by user or the start</title>
 <link>http://www.newlc.com/How-to-detect-if-an-application-is.html#comment-2751</link>
 <description>&lt;div class=&quot;spip-content&quot;&gt;&lt;p class=&quot;spip&quot;&gt;Hello Eric,&lt;/p&gt;

&lt;p class=&quot;spip&quot;&gt;It would be a lot more convenient to do this check already in AppUi ConstructL method, right after the call to BaseConstructL. So, I tried this:&lt;/p&gt;

&lt;p class=&quot;spip&quot;&gt;CApaCommandLine* commandLine = NULL;
    TInt getCommandLineError = CApaCommandLine::GetCommandLineFromProcessEnvironment( commandLine );
    User::LeaveIfError( getCommandLineError );
    CleanupStack::PushL( commandLine );
    MultiThreadedLogger::Log(commandLine-&gt;OpaqueData());
    if(commandLine-&gt;OpaqueData().Length() &gt; 0)
        &lt;i class=&quot;spip&quot;&gt;
        // Opaque data exists, app. has been manually started from the menu
        &lt;/i&gt;
    else 
       &lt;i class=&quot;spip&quot;&gt;
        // App. has been auto-started -&gt; exit if auto-start in settings is OFF
       &lt;/i&gt;
    CleanupStack::PopAndDestroy( commandLine );
    commandLine = NULL;&lt;/p&gt;

&lt;p class=&quot;spip&quot;&gt;But in this approach the OpaqueData field is always empty, so something modifies it after AppUi::ConstructL has been executed. Do you have any idea if this is the case?  According to APPARC documentation, GetCommandLineFromProcessEnvironment should be usable at any time, even in a plain EXE.&lt;/p&gt;

&lt;p class=&quot;spip&quot;&gt;Thanks,
Pawel&lt;/p&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 02 Jan 2007 21:58:42 +0100</pubDate>
 <dc:creator>Pawel</dc:creator>
 <guid isPermaLink="false">comment 2751 at http://www.newlc.com</guid>
</item>
<item>
 <title>How to detect if an application is launched by user or the startup list</title>
 <link>http://www.newlc.com/How-to-detect-if-an-application-is.html</link>
 <description>&lt;div class=&quot;spip-content&quot;&gt;It is sometimes useful to be able to detect whether an application is started at boot time by the Startup List API (present only in S60 3rd Edition) or by the user, and passing Symbian Signed - which is generally required to have an application which requires auto boot feature - makes this almost mandatory. This article will help you with this.&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/How-to-detect-if-an-application-is.html&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/How-to-detect-if-an-application-is.html#comments</comments>
 <category domain="http://www.newlc.com/taxonomy/term/18">Tips</category>
 <category domain="http://www.newlc.com/taxonomy/term/38">Series 60 (Dev)</category>
 <category domain="http://www.newlc.com/taxonomy/term/41">Symbian OS</category>
 <pubDate>Sun, 31 Dec 2006 16:19:24 +0100</pubDate>
 <dc:creator>eric</dc:creator>
 <guid isPermaLink="false">996 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
