On Tue, May 3, 2011 at 8:39 AM, Omkar <[email protected]> wrote:
> Ok, so if I let the intent Action_Power_Connected trigger my service > by declaring this intent filter in the manifest and then let my > service log the required data by creating a registerReceiver for the > Action_Battery_Changed within the code, then I would be saved by not > having the service constantly running. No you would not. If you don't have anything actively running in your process, it can be killed at any time. The suggest to create an alarm to wake up every 5 minutes is a good one. That will actually be more robust than having a service always running. -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

