battery uses by Managed Services

Apr 13, 2009 at 4:22 PM
Hi PeterNowak,

This is wonderful utility to make a services into Windows mobile. Thanks to make this utility.
I want to know about battery uses by Managed services. I Make one sample service which is used to log at every one minute by using timer.
But its cause a very high use of battery. Can you please guide about to avoid high use of battery in such situation.


Thanks

Kpatel
Coordinator
Apr 14, 2009 at 8:43 AM
Hi,

you can change this behavior but only in the SourceCode.
The method Run in the base class ServiceApplication contains "System.Threading.Thread.Sleep(200);"
If you set the value (200) in that case to a larger amount (say 800 or above) the consumtion will be lowered.

Unfortunatelly there is no public property for setting this value, which leads to the point that you have to create your own version of this library.
Generally this is a proposal for a new feature for a next version.

The downside of setting up this value is, that "commands", or Windows Messages sent to the service will take longer to be processed.
I hope this helps for the moment.

Cheers, Peter