P800 : Is multitasking possible?
| Mon, 2003-11-24 10:50 | |
|
What is said in this regard for P800 is when another application is launched, the current application shuts down without saving it's state.
Can I program P800 which will run in the background at the same time when my interface application is running on the foreground? IS multitasking possible with P800? |
|






Forum posts: 100
Yeah multitasking is possible in Symbian. For an application to run in the background you'd have to write a server, which then runs in the background and then write a client application that uses services offered by this server. This is the usual way multitasking is implemented on Symbian platform. Check the SDK topic on RThread and CSession for more information on this topic.
Regards, Aljaz
Forum posts: 24
Actually my problem was to achieve this feature of symbian of multitasking on P800/P900 units.
What documentation of P800 says is that the device closes the running application after new application is launched. Although the device holds the state of closed application it is not useful since the closed application is not in active state.
I am not facing any probelm on series 60 devices but on UIQ.
My query is specific to P800/P900.
Cheers
- Sym_Pro
Forum posts: 11
What documentation of P800 says is that the device closes the running application after new application is launched. Although the device holds the state of closed application it is not useful since the closed application is not in active state.
I am not facing any probelm on series 60 devices but on UIQ.
My query is specific to P800/P900.
I think you misunderstand something. There is no need to have a application running in the background, when you can have the server running. The server is the part of the application wich provides all the services that you wish to keep running.
Why do you need multitasking?
Forum posts: 24
My scenario is like :
2 different applications are running and they continuously talking with each other.
1) Status polling
2) Status updating
3) Using status for changing respective GUI's
Since 2 applications run in parallel and require status to be given to each other I am interested in multitasking.
I can not create 2 threads in the same program as user may close the application which is not desired and hence thought of multitasking.
- Sym_Pro
Forum posts: 78
Forum posts: 622
Forum posts: 78
second how can i make my application to register some part of functionality as a system task and the rest gUI as an app ...so that even if the GUI environment closes the system task continues ........if it is possible
Forum posts: 53
It's not too complex.
An other possibility (depends on the complexity of the background services) is to put those services inside ActiveObjects (CActive).
BTW UIQ does not shut down background apps!
It makes them run (at lower priority) in background.
Only when RAM is running low, the system starts shutting down background apps.
To set your thread as system yu have a few functions that do the work:
CEikonEnv::SetSystem(TBool aSystem) //sets your app as system
CApaWindowGroupName::SetSystem(TBool aSystem)//set any as system
Forum posts: 52
To reply to a couple of other things raised in this (old) thread...
1) whoever mentioned 'polling' - don't do it. Symbian shuts down the CPU whenever nothing's happening; that's why the battery lasts so long. Anything polling will destroy that and the battery will be gone in hours.
2) On UIQ (e.g. P800), to stop your *application* being shut down in the background, just override the SaveL of your CQikDocument. That gets called (with EReleaseRam) when the device wants to free up some memory, and is trying to shut you down. The default implementation is Exit(). This is not an issue for servers, since they are .exes not .apps and will not get shut down. Your server will stay running indefinitely.
Forum posts: 36
I need a way to make a EXE run "forever" ;o)
My exe is a kind of http server, there is no UI (I am using console for tests, but I intend to remove it) ... but I am not using CServer... what kind of modifications should I do
Forum posts: 36
what about using this Recognizer??? is it possible?
Forum posts: 52
There's an HTTP server at
http://www.symbian.com/developer/techlib/staffapps.html
If you really want to run a server indefinitely, be really careful about memory leaks, polling, and other evil things. Obviously
Forum posts: 36
I´ve already had downloaded this example... in fact, I prettry much got inspired by it ;o)
I was thinking that in my case it would be different because there is no UI... I will take a better look at the code of SmallServ