New Symbian Start-On-Boot API

A common task Symbian OS developers face is to set up daemon services that run in the background waiting for or initiating events. For example you might wish to have some code execute or an application be launched at a scheduled time, or in response to receiving an inbound connection. In practice the combination of CActive and CServer classes provides the framework to create the service itself.

What can be tricky, though, is ensuring that the service is running at all times, especially after the phone is rebooted. We provide here for the first time a very simple solution to this problem. The Start-on-Boot API allows you to specify that an executable of your choice be launched and kept running indefinitely by registering it for re-launch as part of the phone's boot sequence. The implementation of the API includes checks which ensure that any malfunctioning executable introduced into the boot sequence which prevents successful reboot subsequently is automatically de-registered.

Details and API download are available on Symbian developer pages: http://www.symbian.com/developer/de...

This news was originally posted on Symbian Developer Network Newsletter. I strongly encourge you to subscribe to it (and continue visiting NewLC as well !).

> New Symbian Start-On-Boot API

did anyone get this to work ?

i installed the dll with the sis provided by symbian

in my code i added a view lines to register an app and added library to my mmp file.

when i nowstart the app it exits promptly, which seems like it cannot load the necessary dll.

any ideas? could i try to load the dll dynamically at runtime?

sebastian

> New Symbian Start-On-Boot API

the API is only for Exe-Files

> New Symbian Start-On-Boot API

my bad. it is actually an exe.

the above error I described, was actually a typo on my end. Again my bad,

registering of my exe works. also the exe is started when rebooting the phone. However, there is a *real* problem at least on the 6600 device. if the main app who registers the exe, does that more than once, it crashes. Symbian is working on a fix for this.

> New Symbian Start-On-Boot API

How you got this to work? Did you make any changes to sis provided by symbian. On which phone you installed it. I want to use it fo making exe files bootable. Plz send me answer as soon as possible Thanks

> New Symbian Start-On-Boot API

Hi Sebastian, it would be very kind of you telling me how you get it to work. I'm trying to add to boot sequence an exe program and when i enter the application which registers the exe it exists promptly as happenend to you...before being to being able to do anything...it seems a problem of dll loading but I don't know exactly what can be...

Thanks in advance !

> New Symbian Start-On-Boot API

hi salva i m facing the same problem as faced by u. have u got its solution?? plz reply soon.. thanks in advance

> New Symbian Start-On-Boot API

my code is as follows

RServiceStartOnBoot iServiceBoot;

iServiceBoot.CreateL();

iServiceBoot.AddServiceL(_L16("C:\\EMCC\\Exes\\HelloWorldCon.exe"));

iServiceBoot.Close();

i m getting KERN-EXEC 3 PANIC

where i m wrong

can anybody help me

a million thanks in advance

How to use Start on boot API

hi all, I am using Nokia 6600 for testing. i downloaded Start on boot API and installed SIS file on my 6600 mobile. Then i created a exe, from which i will launch a app. It works fine. then i created a another exe in which i used start-on-boot api, from where i call the exe that i created already. I compile this exe where i used start-on-boot api and create sis file and move it to mobile. when i run that exe, it is showing error as,

"App. closed Main"

Also if i use app file for using start-on-boot api, it creates same problem, when i launch that application manually. when i reboot my mobile, nothing happens. I dont know wht the problem is. Can anybody help me immediately as it took me almost one week, stil couldnt find any solution. Is those steps i came across are right?

Help me in using this immediately pleaz....

thanks in advance

regards, vignesh p

> New Symbian Start-On-Boot API

Don't even waste your time trying to get that Start-On-Boot thing working. It is so unreliable. Believe me I tried very very hard to get it working properly.

It was almost doing its job ok as long as there was only one EXE registered. Adding another one just would not work. Anyway I won't waste my time describing just how buggy that thing is. To me this framework is simply not market ready.

Use the recognizer framework to start EXEs at boot time. Nokia provides an example of recognizer prior to v9 here. Post v9 example is provided by symbian along with the SDK. I did not test that on v9 though, maybe there would be capability issues.

I didn't try ezboot coz I wasted too much time on the Start-On-Boot already.

Assuming that your EXE is installed on the same drive as the recognizer DLL here is how to start it up from the recognizer's C++ constructor:

  _LIT(KMyExe,c:\\system\\programs\\myexe.exe);
  TFileName dllFileName;
  Dll::FileName(dllFileName);
  TParsePtrC ptr(dllFileName);
  //Now set the drive in the file path
  TParse parse;
  parse.Set(ptr.Drive(),&KMyExe,NULL);

  //Get the name of our executable
  TFileName fileName=parse.FullName();
  RProcess process;
  TInt err=process.Create(fileName,KNullDesC());
  if (err==KErrNone)
     {
     process.Resume();
     process.Close();
     }

Just make sure your recognizer code won't panic or leave. To be safe while implementing/debugging that thing always install it on a removable drive. Thus if it prevents your phone to boot up you can just remove the memory card and delete the recognizer file from your PC.

Happy programming!!! ;)

Re: > New Symbian Start-On-Boot API

If you dont mind can u give me the code in brief.I have worked on it but it is failing somewhere. If possible can u send the application too.

> New Symbian Start-On-Boot API

Don't even waste your time trying to get that Start-On-Boot thing working. It is so unreliable. Believe me I tried very very hard to get it working properly.

It was almost doing its job ok as long as there was only one EXE registered. Adding another one just would not work. Anyway I won't waste my time describing just how buggy that thing is. To me this framework is simply not market ready.

Use the recognizer framework to start EXEs at boot time. Nokia provides an example of recognizer prior to v9 here. Post v9 example is provided by symbian along with the SDK. I did not test that on v9 though, maybe there would be capability issues.

I didn't try ezboot coz I wasted too much time on the Start-On-Boot already.

Assuming that your EXE is installed on the same drive as the recognizer DLL here is how to start it up from the recognizer's C++ constructor:

  _LIT(KMyExe,c:\\system\\programs\\myexe.exe);
  TFileName dllFileName;
  Dll::FileName(dllFileName);
  TParsePtrC ptr(dllFileName);
  //Now set the drive in the file path
  TParse parse;
  parse.Set(ptr.Drive(),&KMyExe,NULL);

  //Get the name of our executable
  TFileName fileName=parse.FullName();
  RProcess process;
  TInt err=process.Create(fileName,KNullDesC());
  if (err==KErrNone)
     {
     process.Resume();
     process.Close();
     }

Just make sure your recognizer code won't panic or leave. To be safe while implementing/debugging that thing always install it on a removable drive. Thus if it prevents your phone to boot up you can just remove the memory card and delete the recognizer file from your PC.

Happy programming!!! ;)

> New Symbian Start-On-Boot API

Can someone please post some sample code for this!!??

> New Symbian Start-On-Boot API

can anyone tell me how to use this API in detail. please.....

> New Symbian Start-On-Boot API

I have downloaded the zip file for this API, but the SIS file included wouldn't install properly on an NGage. I got the error: "Requires series 60 product ID"

Assuming that the pkg file was used to create the SIS files, I found that the product ID is in fact declared, but that various dlls seem to be missing from the zip file, which prevents me from rebuilding the SIS file...

Does anyone have any suggestions??

> New Symbian Start-On-Boot API

Too include startonboot in your on SIS file just add the following line to your PKG: @"exestartonboot_S60v2_0.sis",(0x10201872)