returns START_STICKY in your onStartCommand method of your service. On Mon, Sep 6, 2010 at 8:51 PM, sunny <[email protected]> wrote: > Dear Folks, > I have a service that is running within the context of my application. It > gets invoked at the start of the activity and then gets update when new data > is inserted or deleted from the database. The problem is that everytime I > start the activity , it restarts the service. As you may have guessed - not > a very intuitive design. Therefore I was wondering if there is a way to > determine if the service is already running before starting it. I know I can > bind to the service but I do not want that since the main activity needs to > exits after the database operation is completed. > > I know for system services, you can get the service details from the > application context. How do you do it for user defined service? > > thanks for all help here. > > regards > Sunny. > > -- > 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
-- 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

