I recently started to create application that behave like Services on Windows that can run silently on background right from device power on (autostart type app) and keep sending GPS coordinates to server i specified.
I follow code example on Nokia Wiki about creating Daemon and found some interesting question:
1. If i package the file into .sis using ensymble, do the console (or GUI) will showed up each time my application start? as a note i create non-GUI app and didn't use console to write anything from application
2. i've tried the Daemon code, it works well when it call thread that run once, but seem fail when i try create/call a thread that call itself (recursive), how to solve this? example code that didn't work:
however if i create such application w/o daemon setting and directly call
lock = e32.Ao_lock()
lockTHR = thread.allocate_lock()
# code to send & get coordinates will goes here
appuifw.app.title = u"GPSLocator"
appuifw.app.exit_key_handler = lambda:lock.signal()
print "GPSLocator - Start"
print "GPSLocator - Stop"
appInit() it works well (recursive every 60 seconds)
#1 I have create some similar application in Blackberry J2ME and able to do silent & background processing application without hassle so this question maybe a comparison, since in Standar J2ME (midlet) i can't achieve this w/o push registry