is it possible to run a daemon on a symbian phone in the background? the action of the daemon would be to connect to a server over gprs from time to time or send a sms.
background daemon?
I successfully wrote a little program which stays active in background waiting for Game-B button to be pressed and pop-up the task manager, so I suppose you could write a program which stays in the background and waits for something.
If you discover HOW to detect from OPL if leaving SMS remained in outbox, and how to send them (well, actually I can do THIS), please let me know... :frown:
This is the source code for my "PopTask" application (never released actually...):
include "system.oxh"
include "const.oph"
PROC Main:
global b&(6),hh&,hh2&,kk&,ev&(6),tasto&
gsetwin 0,25,208,275print "Popup task manager activated."
print "Press GAME2 key to display."
print "Press Power key to exit."
hh&=sycapturekey&😞63581,0,0)
hh2&=sycapturekey&😞63580,0,0)
do
kk&=getk&:
if kk&=63581
sysetforeground:
sycancelcapturekey😞hh&😉
hh&=sycapturekey&😞63581,0,0)
sydisplaytasklist:
kk&=0
pause 20
sysetforeground:
endif
if kk&=63580
sycancelcapturekey😞hh2&😉
sycancelcapturekey😞hh&😉
sysetforeground:
cls
print "Button 1 to suspend PopTask."
print "Button 2 to exit."
tasto&=get
if tasto&=-1956
print "PopTask suspended"
print "Switch back to PopTask"
print "and press a key to"
print "re-enable it."
get
hh&=sycapturekey&😞63581,0,0)
hh2&=sycapturekey&😞63580,0,0)
endif
if tasto&=-1955
print "quitting PopTask..."
pause 20
return
endif
endif
sysetbackground:
until 0
sycancelcapturekey😞hh&😉
ENDP
proc getk&:
global status%
geteventa32 status%,b&()
return b&(1)
endp
My original project was to have this small app started at phone startup, to have taskmanager always available just by pressing GAME-B key, but I don't know how to auto-start my program (without breaking my phone, at least... 😮 ).