×
Namespaces

Variants
Actions
(Difference between revisions)

Autostart Qt applications at boot on Symbian devices

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Added category Category:Symbian. (Adding Symbian to all Qt for Symbian topics (which is about to be removed)))
hamishwillee (Talk | contribs)
m (Text replace - "<code cpp>" to "<code cpp-qt>")
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Qt for Symbian]]
+
[[Category:Qt]][[Category:Symbian]][[Category:How To]][[Category:Code Examples]]
{{ReviewerApproved}}
+
{{Abstract|This article shows how to implement an app autostart feature in Qt using the Symbian C++ Startup List Management API. The procedure extends the process described in [[How to autostart an application on boot up using Startup List Management API]] for Qt, making it easier to use for developers who are not as familiar with Symbian C++.}}.
  
 
+
{{ArticleMetaData <!-- v1.2 -->
==Descriptions==
+
|sourcecode= [[Media:QtAutoStartApp.zip]]
 
+
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
For implementing autostart in Qt, we need to use Startup List Management API of symbian. The procedure to implement autostart in Qt is same as described in [[How to autostart an application on boot up in 3rd- Startup List Management API]], so this article is, specially, useful to those developer who are not familiar with Symbian.
+
|devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') -->
 +
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Qt SDK 1.1.4]) -->
 +
|platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later -->
 +
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
 +
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
 +
|signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
 +
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 +
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 +
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 +
|translated-by= <!-- [[User:XXXX]] -->
 +
|translated-from-title= <!-- Title only -->
 +
|translated-from-id= <!-- Id of translated revision -->
 +
|review-by= <!-- After re-review: [[User:username]] -->
 +
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 +
|update-by= <!-- After significant update: [[User:username]]-->
 +
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 +
|creationdate= 20090627
 +
|author= [[User:Savaj]]
 +
}}
  
 
== Startup List Management API ==
 
== Startup List Management API ==
  
Steps for auto-starting an EXE on boot time in [[Qt for Symbian]].
+
Steps for auto-starting an EXE on boot time in [[Qt]].
  
 
'''1.''' Create an .RSS file in your project's directories.
 
'''1.''' Create an .RSS file in your project's directories.
Line 19: Line 37:
 
Add the following code to the new .rss file:
 
Add the following code to the new .rss file:
  
<code cpp>
+
<code cpp-qt>
 
#include <startupitem.rh>
 
#include <startupitem.rh>
  
Line 36: Line 54:
 
Add the following lines to include the new resource in the build and attach .RSC file to package.
 
Add the following lines to include the new resource in the build and attach .RSC file to package.
  
<code cpp>
+
<code cpp-qt>
 
symbian {
 
symbian {
  
Line 60: Line 78:
  
 
* If the EXE exits within a few (about 5?) seconds of starting up, a message is displayed, reading: ''Unable to start <name of EXE>. Application may need to be removed.''
 
* If the EXE exits within a few (about 5?) seconds of starting up, a message is displayed, reading: ''Unable to start <name of EXE>. Application may need to be removed.''
 
+
* <font color="#d33b27">'''Startup List Management API does not work with [[How to sign a .Sis file with Self-Sign Certificate|Self-Signed application]].'''</font> It should be signed with a trusted certificate (Open Signed Online or Open Signed Offline during R&D stage and Symbian Signed when released) even if otherwise the [[capabilities]] required for the project do not justify it.
* There are several Known Issues and Technical Solutions about using the Startup List logged in the [http://www.forum.nokia.com/document/Forum_Nokia_Technical_Library Forum Nokia Technical Library]. Search for "Startup List" to get an up-to-date overview.
+
 
+
* <font color="#d33b27">'''Startup List Management API does not work with [[How_to_sign_a_.Sis_file_with_Self-Sign_Certificate|Self-Signed application]].'''</font> It should be signed with a trusted certificate (Open Signed Online or Open Signed Offline during R&D stage and Symbian Signed when released) even if otherwise the [[capabilities]] required for the project do not justify it.
+
 
+
 
* The exe to be started must be installed directly from the root of the package that contains the resource file (not accepted from embedded file)
 
* The exe to be started must be installed directly from the root of the package that contains the resource file (not accepted from embedded file)
 
+
* [https://www.symbiansigned.com/app/page Symbian Signed]'s [[Symbian Signed Test Criteria V4 Wiki version|Test Criteria]] mandates that the user must have the option to turn the autostart feature on/off. For info on how applications may implement such feature please see [[CS001564 - Implementing user-selectable autostart feature in Qt for Symbian]]
* [http://www.symbiansigned.com/ Symbian Signed]'s [http://developer.symbian.org/wiki/index.php/Symbian_Signed_Test_Criteria_V4_Wiki_version Test Criteria] mandates that the user must have the option to turn the autostart feature on/off. For info on how applications may implement such feature please see [[Implementing user-selectable autostart feature in Qt for Symbian]]
+
  
 
== Download Example Code ==
 
== Download Example Code ==
Line 74: Line 87:
 
==See also==
 
==See also==
  
* [[Implementing user-selectable autostart feature in Qt for Symbian]][[Category:How To]][[Category:Code Examples]] [[Category:Qt]] [[Category:Symbian]]
+
* [[CS001564 - Implementing user-selectable autostart feature in Qt for Symbian]]

Latest revision as of 04:16, 11 October 2012

This article shows how to implement an app autostart feature in Qt using the Symbian C++ Startup List Management API. The procedure extends the process described in How to autostart an application on boot up using Startup List Management API for Qt, making it easier to use for developers who are not as familiar with Symbian C++..

Article Metadata
Code ExampleCompatibility
Platform(s):
Symbian
Article
Created: savaj (27 Jun 2009)
Last edited: hamishwillee (11 Oct 2012)

Contents

[edit] Startup List Management API

Steps for auto-starting an EXE on boot time in Qt.

1. Create an .RSS file in your project's directories.

For example: 06000001.rss

Here a number is used for the name, which is the same as the Package UID (pUID) of the project. This might help later in identifying the resource and is a good reminder when adding the entry in the PKG file. The name is however irrelevant at this point.

Add the following code to the new .rss file:

#include <startupitem.rh>
 
RESOURCE STARTUP_ITEM_INFO startexe
{
executable_name = "!:\\sys\\bin\\QtAutoStartApp.exe";
recovery = EStartupItemExPolicyNone;
}

In the code above:

  • QtAutoStartApp.exe is the name of the application to be started and this will of course depend on your choice of name for your project. Must be the same as specified for the TARGET statement in the MMP file.

2. Open your .PRO file.

Add the following lines to include the new resource in the build and attach .RSC file to package.

symbian {
 
# Define rss file for autoboot
autoStartBlock = \
"SOURCEPATH ." \
"START RESOURCE 06000001.rss" \
"END"
 
MMP_RULES += autoStartBlock
 
# Deploy rsc file to package.
deployRscFile = "\"$${EPOCROOT}epoc32/data/06000001.rsc\" - \
\"C:/private/101f875a/import/[06000001].rsc\""

deployFiles.pkg_postrules += deployRscFile
DEPLOYMENT += deployFiles
}


3. That's it. Now just build the project and deploy sis file on device. On the next phone reboot your application will be started automatically.

[edit] Notes

  • If the EXE exits within a few (about 5?) seconds of starting up, a message is displayed, reading: Unable to start <name of EXE>. Application may need to be removed.
  • Startup List Management API does not work with Self-Signed application. It should be signed with a trusted certificate (Open Signed Online or Open Signed Offline during R&D stage and Symbian Signed when released) even if otherwise the capabilities required for the project do not justify it.
  • The exe to be started must be installed directly from the root of the package that contains the resource file (not accepted from embedded file)
  • Symbian Signed's Test Criteria mandates that the user must have the option to turn the autostart feature on/off. For info on how applications may implement such feature please see CS001564 - Implementing user-selectable autostart feature in Qt for Symbian

[edit] Download Example Code

Startup List Management Example in Qt

[edit] See also

This page was last modified on 11 October 2012, at 04:16.
223 page views in the last 30 days.
×