On Tue, Nov 23, 2010 at 9:22 AM, David_Fisher <davidfsh...@gmail.com> wrote: > Hi, once we call the startService() method, can we keep the service > alive until its explicitly stopped by the user?
If you use startForeground(), that will help prevent the OS from stopping your service. However: -- this will not stop task killers, at least of the 2.1-and-earlier variety -- for your circumstance, an everlasting service should not be needed > The > idea is that when I receive an incoming call, I want to start > recording and once the status changes to idle, I want to stop the > recording. Please listen for the broadcast Intents about phone state changes. Please do not use a PhoneStateListener for this, forcing you to keep your service in memory all of the time. Also, bear in mind that you have no access to the in-call audio, so unless you are running in speakerphone mode, I fail to see how you can accomplish your objectives. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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