I'll try to mess around with the alarm manager. The reason my service is always running is because it monitors the user's location in the background. Obviously, the user will be able to disable this feature and manage how active it is (for battery conservation) but the application would be relatively useless without it always being running.
I suppose I could set the application to run once a minute (or whatever interval the user sets) instead of constantly running in the background... I'll investigate that as an option and I'm assuming the Alarm Manager is what I would use? On Jun 21, 12:11 pm, Mark Murphy <[email protected]> wrote: > Micah wrote: > > Bump for the weekend crowd. Anyone know how to test BOOT_COMPLETED > > intents? > > Outside of Eclipse, install the application, reboot the emulator, and > live without a debugger. Use the Log class to emit information to LogCat > as needed. > > >> I'm using Eclipse on windows to do my Android development and I want > >> to test / debug some code that runs on Android startup. I have setup > >> my program to receive the BOOT_COMPLETED broadcast intent (which is > >> working) and from there it launches a service that runs in the > >> background on the device indefinitely. > > Consider switching your service to run off of AlarmManager for scheduled > bits of work. There is very little in Android that really requires you > to have a service running "indefinitely", particularly since they won't > (e.g., Android can shut them down if needed for memory, they won't run > while the device is asleep). Use your BOOT_COMPLETED listener to > schedule the AlarmManager. > > This has the side benefit of being more testable in Eclipse, since you > can play with the alarm settings to get it to fire off sometime after > you have the debugger set up. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Warescription: Three Android Books, Plus Updates, $35/Year --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" 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-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

