Hello, I am stuck with making a decision and I could use some expert help.
I have a need to monitor motion, either with the compass or accelerometer to ensure that someone is safe. I have code which works really well when using the accelerometer, BUT it can suck a battery flat in around 30 minutes. To help mitigate this i am considering a 'duty-cycle- of 1 minute on, and 1 minute off - so should straight away be on to a 50% increase in battery life, and later I'll refine this. Im developing for api 7 (2.1 eclair) and while I have some programming experience, i need guidance on which route to follow to enable the duty-cycle usage of the accelerometer. One avenue of research indicates that using threads is the way to go - however since threads can be killed off with the main UI (screen goes to sleep, etc), so i'm leaning towards using a service which can I can START_STICKY. Which route do you recommend? Thread or Service? Regards, Fred -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en