I have a service that will send out notifications with timed tasks. I need this service to run outside the life of the application, but I only need to access the services functions during the lifespan of the app. Is a local service enough or do I need to implement AIDL?
Thanks.
I have a service that will send out notifications with timed tasks. I need
Share
By this, I hope you mean
AlarmManagerand anIntentService, such that your service is only in memory for the minimum possible time, enough to do a bit of work, raise theNotification, and go away. Do not write services that attempt to live forever, since that is impossible — users or the operating system will kill off your service.By asking that question, I believe that you have more fundamental problems, such as not using
AlarmManagerand anIntentServicefor your periodic work. Your raise-a-Notification-periodically service should not be running, and hence there should be no “services functions” that you are trying to access on it.