| Reply | « Previous Thread | Next Thread » |
|
Hello,
I want to make an event based framework where people extend a class and then get notified of different events such as incoming SMS, updated GPS coordinates,calls etc. So basicly Im thinking of doing a while(true) loop in the main class and then call the methods once a certain event has occurred. However Im afried that an while loop which does not sleep will take up too much power consumption.... Any ideas how I can just alert users of events with my framework? Can I tell python to call a certain method once an event occours? Then I would just be able to forward the event... |
|
Quote:
Well you can have delay in your While loop. Also for incoming sms you can call the function using bind. However you will have to use the delay in the function. (e32.ao_sleep(0.1)) Quote:
Best Regards Croozeus |
|
Thanks for your reply.
But I really dont want to use a delay as I want users of the framework to write code which can rely on their methods being invoked the milisec the event happens... I guess what Im looking for is a way to get around using a while loop and instead be notified of different events that happen and then have my methods called when that even happen... Like you mentioned yourself a bind method for incoming messages but then not just for messages also for when battery strength is 0, above 0, when power is almost out etc. I guess what I am asking is how can I make these hooks? Thanks in advance |
|
Quote:
Mikko Ohtamaa Twinapex Research http://www.twinapex.com |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| XMPP based IM framework? | masterchief2004 | Mobile Java General | 0 | 2007-10-12 12:00 |
| why I can't send the key "1" event | songlinhe | General Symbian C++ | 3 | 2007-05-30 09:05 |
| New Wireless framework based on Jabber Protocol | Afify | Mobile Java General | 0 | 2007-02-04 00:29 |
| New Wireless framework based on Jabber Protocol | Afify | Mobile Java Tools & SDKs | 0 | 2007-02-04 00:28 |
| CLogEvent problem | silviuccia | General Symbian C++ | 2 | 2006-12-22 16:28 |