Implement and dynamically configure auto-start upon startup in version 3
From Forum Nokia Wiki
Applicable version:
Serire 60 3rd Edition
Specific solution: In version 3, the new Startup List Management API is used to enable auto-start upon Startup. To enable Automatic startup of an application, follow these steps: 1. create a resource file named 0xXXXXXX under the data Directory of the project. rss, 0xXXXXXX is the UID3 of the program to be started. Fill in the following content in the resource file:
# Include <startupitem. rh>
RESOURCE STARTUP_ITEM_INFO startexe
{
Executable_name = "// sys // bin // YourAppName.exe"; // replace it with your program name
Recovery = estartupitemexw.ynone;
}
2. Add the resource file to your project file. mmp.
SOURCEPATH ../data
Start resource 0xXXXXXX. rss
END
3. Update your package PKG file. Note that this resource file can only be installed on drive C. Do not forget the brackets:
"/Epoc32/data/0xXXXXXX. rsc"-"c:/private/101f875a/import/[XXXXXX]. rsc"
In this way, after your program is re-compiled and packaged, you can use the developer certificate signature to enable automatic startup upon startup.
If you want to enable auto-start of the configuration program according to the settings, you also need to complete the following steps: 1. Modify the registered resource file YourAppName_reg.rss of the program and add the following code:
# Include <appinfo. rh>
# Include <uikon. rh>
RESOURCE APP_REGISTRATION_INFO
{
// Original code
Opaque_data = r_startup_detect;
}
RESOURCE NUMBER_INT8 r_startup_detect
{Value = 1 ;}
2. Reload the ProcessCommandParametersL () function in AppUi.
Bool CYourAppNameAppUi: ProcessCommandParametersL (CApaCommandLine & aCommandLine)
{
If (aCommandLine. OpaqueData (). Length ()> 0)
{
// Manually start
}
Else
{
// This indicates that the program is automatically started after it is started. If it is set to not automatically started after it is started, the exit () function is called here to exit.
}
Return ceikappui: processcommandparametersl (acommandline );
}
If the IMEI signature is required, the self-signature cannot be used.