PDA

View Full Version : Startup list management S60 v3


arizkohli
2005-11-25, 16:20
Hi,

We want to use Startup list management API to autostart an application for series60 version 3.0. but its not working.

We have a resource file "123456789.rss" (where "123456789" is the UID of the application) and its contents are

//////////////////////////////////////////////////////

#include <startupitem.rh>

RESOURCE STARTUP_ITEM_INFO ExampleExe
{
executable_name = "!:\\sys\\bin\\Example.exe";
recovery = EStartupItemExPolicyNone;
}

//////////////////////////////////////////////////////


And we copy the following files through package file:

///////////////////////////////////////////////////////////////////////

"\epoc32\release\gcce\urel\Example.exe"-"!:\sys\bin\Example.exe"
"\epoc32\data\z\private\10003a3f\import\apps\Example_reg.rsc"-"!:\private\10003a3f\import\apps\Example_reg.rsc"
"\epoc32\data\z\resource\apps\Example_loc.Rsc"-"!:\resource\apps\Example_loc.Rsc"
"\epoc32\data\z\resource\apps\Example.Rsc"-"!:\resource\apps\Example.Rsc"
"\epoc32\data\z\private\10003a3f\import\apps\176426778.rsc"-"c:\private\101F875a\import\176426778.rsc"

///////////////////////////////////////////////////////////////////////

Could anybody please tell if the above lines are correct? Or is there anything we are missing?

Do we require any capability for autostarting applicatrion. Our application is having capability "None".

Thanks, AMK

prabhubalajishankar
2006-01-23, 10:35
Hi AMK,

Have u succeed in Autostart for Series60 3.0?
If so , what changes we have to make in .pkg or .rss file

thanks,

arizkohli
2006-01-23, 12:28
Yes, it has to be on the C: drive for now, will change later. There is something you have to do with the resource file. I think it is mentioned in the latest sdk docs.

AMK

prabhubalajishankar
2006-01-23, 13:13
Is it possible to check the Autostart in Series 60 3.0 Emulator.
I tried in Helloworldbasic program by giving,

include <startupitem.rh>
RESOURCE STARTUP_ITEM_INFO listener_server
{
executable_name = "!:\\Symbian\\9.1\\S60_3rd_Beta\\Epoc32\\release\\winscw\\udeb\\HelloWorldBasic.exe";
recovery = EStartupItemExPolicyNone;
}

and in .mmp as

START RESOURCE 10005B91.rss
HEADER
TARGETPATH resource\apps
END //RESOURCE

But helloworldbasic.exe does not start during boot up.

Anything i am missing here?
Thanks,

arizkohli
2006-01-24, 08:27
I have no idea; never tested autostart on the emulator as the emulator was quite messy when we started developing.

AMK

prabhubalajishankar
2006-01-24, 10:43
Hi,

Thanks for your immediate response.
If you have not tested it in emulator,have u used 3.0 device directly..

Regards,

Jan-Anders
2006-02-03, 09:31
The name of the file should be [UID].rss not only UID.rss and the RSC file should naturally be named in the same manner.

The HEADER statement int the RESOURCE declaration is not neeced as you do not use the [UID].rsg file

//J-A

mapeters
2006-02-06, 20:20
I have tried this feature, seemingly exactly as documented and discussed in this thread, but I see no evidence that it works. My startup .exe writes trace info to a file as the first thing it does, but that file is never created.

My startup list resource file apparently gets thrown away by the system after the install, since it doesn't exist in the import directory. In fact, there are no files at all anywhere under c:\private\101f875a.

Are there any hidden requirements for this to work?

Thanks!

Mark Peters

Jan-Anders
2006-02-07, 07:09
As far as I know there aren't any hidden requirements apart from those mentined in the SDK help.

1) The installation package containing the application must be trusted, i.e. it must be signed with a valid certificate.

2) The installation package must install the application executable to be added into the startup list.

3) The installation package type must be SISAPP.

4) In case of an embedded package, the control file must be included in the parent package.

5) The control file must be named as [<package UID>].RSC, where <package UID> equals to the UID of the installation package.

6) The control file must not contain any other resource items than those defined in the Detailed Description:

BYTE version
Indicates the version of the API. Do not use.

LTEXT Executable_name
Full path to the executable.

WORD recovery
Recovery policy used in case of failure in executable launch.


The RSC file is processed by the installer and deleted from the import directory. Instead a [UID].dat file can be found in the startup directory (c:\private\101f875a\startup)

Does your application fulfill the first critera? Unless you have a valid certificate, automatic startup is not possible.

//J-A

skypu
2006-02-08, 13:58
Hi:

I also encount the automatic startup problem in my problem. Now I solve this problem and it can work on the target device(N91, S60 3rd Edition). According to what your said before. I can give some suggestion for you to try once more:
1. the resource file "[UID3].rss" must be add with the [], for example, [0FFFFF04].rsc
2. the .exe file which to atuo startup should be a Non-GUI application, such as listeren, server, console application.
3. The sis should be signed with a valid certification. In my project, I signed with the ACS DevCert(the self-signed sisx is regard as an un-trusted application in S60 3rd Edition).

Hope these can help you to solve your problem

======sky pu======

skypu
2006-02-08, 14:59
Hi:

I am sorry. you can use a GUI applicaiton as a startup application.

======sky pu =====

prabhubalajishankar
2006-02-14, 11:13
Can We test this Autostart in S60 3rd edition SDK? will it work?

skypu
2006-02-15, 18:27
Can We test this Autostart in S60 3rd edition SDK? will it work?

I do not think so, because during the installing on the target device, the SWI will import the autostart information automatically, which can not do in emulator.

blizzz
2006-02-17, 17:50
I seem not to be able to get that working. i believe i did all the required steps
did anyone got that working? i use a E60, with a rom build from october or so...

skypu
2006-02-19, 18:17
Yes, I was success doing it in some devices, like E61,N91,Nokai 3250.

====sky pu=====

rihoe
2006-04-26, 12:21
Here is a working sample of startup program:
http://symbiancoder.com/

Jan-Anders
2006-04-26, 12:36
I have sucessfully used in E60, E61 and E70

//J-A

sailaja_v_s
2006-06-05, 11:15
Hi,
I am facing problem in placing HelloWorldBasic app in the startup list.

My .mmp code is as below

###################
TARGET HelloWorldBasic.exe
TARGETTYPE exe
UID 0x100039CE 0xA000017F

SECUREID 0xA000017F

SOURCEPATH ..\src
SOURCE HelloWorldBasic.cpp
SOURCE HelloWorldBasicApplication.cpp
SOURCE HelloWorldBasicAppView.cpp
SOURCE HelloWorldBasicAppUi.cpp
SOURCE HelloWorldBasicDocument.cpp

SOURCEPATH ..\data


START RESOURCE HelloWorldBasic.rss
HEADER
TARGETPATH resource\apps
END //RESOURCE


START RESOURCE [A000017F].rss
TARGETPATH \private\101f875a\import
END



USERINCLUDE ..\inc

SYSTEMINCLUDE \epoc32\include

LIBRARY euser.lib
LIBRARY apparc.lib
LIBRARY cone.lib
LIBRARY eikcore.lib
LIBRARY avkon.lib
LIBRARY commonengine.lib
LIBRARY efsrv.lib
LIBRARY estor.lib aknnotify.lib eiksrv.lib aknskins.lib aknskinsrv.lib aknswallpaperutils.lib

LANG SC
#############################

I have defined [A000017F].rss and its content is as below

#include <startupitem.rh>

RESOURCE STARTUP_ITEM_INFO HelloWorldBasic
{
executable_name = "c:\\sys\\bin\\HelloWorldBasic.exe"; // dispatcher can be installed
// to memory card as well
recovery = EStartupItemExPolicyNone;
}

and my pkg file is as below

; HelloWorldBasic.pkg
;
;Language - standard language definitions
&EN

; standard SIS file header
#{"HelloWorldBasic"},(0xA000017F),1,0,0

;Localised Vendor name
%{"Vendor-EN"}

;Unique Vendor name
:"Vendor"

;Signature
*"key-gen.key","HelloWorldBasic.cer",KEY="rayn"

;Supports Series 60 v 3.0
[0x101F7961], 0, 0, 0, {"Series60ProductID"}

;Files to install
"\Symbian\9.1\S60_3rd\epoc32\release\gcce\urel\HelloWorldBasic.exe" -"c:\sys\bin\HelloWorldBasic.exe"
"\Symbian\9.1\S60_3rd\epoc32\data\z\resource\apps\HelloWorldBasic.rsc" -"c:\resource\apps\HelloWorldBasic.rsc"
"\Symbian\9.1\S60_3rd\epoc32\data\z\private\10003a3f\import\apps\HelloWorldBasic_reg.rsc" -"c:\private\10003a3f\import\apps\HelloWorldBasic_reg.rsc"
"\Symbian\9.1\S60_3rd\epoc32\data\z\private\101f875a\import\[A000017F].rsc" -"c:\private\101f875a\import\[A000017F].rsc"



Somehow my app is not starting when powered on.

I have written ConstructL as below

void CHelloWorldBasicAppUi::ConstructL()
{
// Initialise app UI with standard value.
BaseConstructL(CAknAppUi::EAknEnableSkin);
// Create view object
iAppView = CHelloWorldBasicAppView::NewL( ClientRect() );

RFile iLogFile;
RFs iSession;

iSession.Connect();
_LIT8(kText,"HelloWorlsCreated");
TInt err = iLogFile.Open(iSession, _L("c:\\HelloWorldBasic.txt"), EFileShareExclusive | EFileWrite);
if(err == KErrNotFound)
{

iLogFile.Create(iSession, _L("c:\\HelloWorldBasic.txt"), EFileShareExclusive | EFileWrite);

iLogFile.Write(kText);
}

iLogFile.Close();
iSession.Close();


}


I am not able to see HelloWorldBasic.txt file after startup..



Please tell me where I am going wrong...


Regards,
Sailaja.

symbipatni
2006-08-03, 15:46
hi,
Please suggest what an error in this code. sorry but can’t find out..


//test.mmp
TARGET Test.exe
TARGETTYPE exe

UID 0x0 0x01020304
SECUREID 0x01020304

LANG SC

EPOCSTACKSIZE 0x5000

SOURCEPATH .
SOURCE Test.cpp

START RESOURCE [01020304].rss
END

SYSTEMINCLUDE . \epoc32\include

LIBRARY euser.lib efsrv.lib

//-------------------------------------

//[01020304].rss

#include <startupitem.rh>

RESOURCE STARTUP_ITEM_INFO test
{
executable_name = "c:\\sys\\bin\\Test.exe";
recovery = EStartupItemExPolicyNone;
}

///--------------------------------------------------

//Test.cpp
#include <e32base.h>
#include <e32cons.h>
#include <utf.h>
#include <s32file.h>

LOCAL_C void ExeMainL()
{
_LIT(KFilePath,"c:\\data\\test.txt");
TBuf<50> pbuf;
pbuf.Append(KFilePath);

TBuf8<10> bufdata8;

RFs iFs;
RFile fp;
iFs.Connect();
TInt err=fp.Open(iFs,pbuf, EFileShareAny|EFileWrite|EFileRead);;
if(err==KErrNotFound) // file does not exist - create it
{
err=fp.Create(iFs,pbuf, EFileShareAny|EFileWrite|EFileRead);
_LIT8(KTEXT,"1");
bufdata8.Append(KTEXT);
fp.Write(bufdata8);
fp.Close();
iFs.Close();
}
else
{
_LIT8(KTEXT,"deepak");
bufdata8.Append(KTEXT);
fp.Write(bufdata8);
bufdata8.Trim();
fp.Close();
iFs.Close();



}

}

GLDEF_C TInt E32Main()
{
__UHEAP_MARK;
CTrapCleanup* cleanup = CTrapCleanup::New();

TRAPD(error, ExeMainL());
__ASSERT_ALWAYS(!error, User::Panic(_L("TEST"), error));

delete cleanup;
__UHEAP_MARKEND;

return 0;
}
//--------------------------------------
//Test.pkg
;Languages
&EN

; UID is the app's UID

#{"Test"},(0x01020304),1,0,0,TYPE=SISAPP

; Vendor name
%{"Vendor"}

; Unique Vendor name
:"Unique Vendor"

;Supports Series 60 v 3.0
[0x101F7961], 0, 0, 0, {"Series60ProductID"}

;
; Files to install
;
"\epoc32\release\gcce\udeb\Test.exe"-"!:\sys\bin\Test.exe"
"\Epoc32\Data\01020304.rsc"-"!:\private\101f875a\import\[01020304].rsc"


///---------------------------------------------

thanks

wosberg
2006-08-31, 15:55
Hi Symbipatni,

Thanks for posting that code. After changing the resource definition inside the MMP file from:

START RESOURCE [01020304].rss

to

START RESOURCE 01020304.rss

it worked fine for me on the 3250, E61 and N80. However, I'm seeing that when the phone restarts and the startup app it called, I get an error:

"Unable to start test. Application may need to be removed".

Although it gives this error, the startup application is actually being started and works correctly (except that it pops up the error message).

Has anyone else seen this error when running the startup app, and if so, do you know how it may be avoided?

Thanks,
Wil

wosberg
2006-08-31, 16:24
Hi,

I just got my answer by looking at another thread:

http://discussions.forum.nokia.com/forum/showthread.php?p=218816#post218816

Added a few seconds delay looks like it works (doesn't explain why it didn't work in the first place, but it seems to work in any case).

Cheers

se_manish
2006-09-13, 06:11
Yes, I was success doing it in some devices, like E61,N91,Nokai 3250.

====sky pu=====

I have tried all the Steps described by u, but when i launch the Signed Application it shows the System Error. pl help

tan_aslam@yahoo.co.uk
2006-09-15, 12:50
Hi:
1. the resource file "[UID3].rss" must be add with the [], for example, [0FFFFF04].rsc

======sky pu======

I can't creat this startup list amangement resource file. Do i have to do some thing special in .MMP file

Here is the segment which try to generate [20200EBB].RSC.

SOURCEPATH ..\data
START RESOURCE [20200EBB].rss
TARGETPATH \private\101f875a
END //RESOURCE

MMP get process successfully but no .RSC file. How ever if I compile resource without [] it creates .RSC file

Any help appreciated
Thanks in advance

mateen_maldar
2006-09-15, 12:55
hi,

plz go through this thread...

http://discussion.forum.nokia.com/forum/showthread.php?t=88374&highlight=Startup+list+management

Will help u find ur solution..
Regards,
Mateen Maldar

jyrkiettila
2006-09-18, 11:34
I can't creat this startup list amangement resource file. Do i have to do some thing special in .MMP file

Here is the segment which try to generate [20200EBB].RSC.

SOURCEPATH ..\data
START RESOURCE [20200EBB].rss
TARGETPATH \private\101f875a
END //RESOURCE

MMP get process successfully but no .RSC file. How ever if I compile resource without [] it creates .RSC file


Have you checked, if it creates \private\101f875a[20200EBB].RSC instead of \private\101f875a\[20200EBB].RSC ?

tan_aslam@yahoo.co.uk
2006-09-18, 17:12
Have you checked, if it creates \private\101f875a[20200EBB].RSC instead of \private\101f875a\[20200EBB].RSC ?

Yes I have checked it doesnt creat .RSC file But thanks I have foud the solutuon, you have to create resouce WITHOUT square brackets and then in .PKG files you just copy it WITH [] brackets