Is there any way to keep my background service running indefinitely even if there is no activity of application currently running ?
there is a requirement where user can use other application on the phone and he either closed all application’s activities or he moved to other application so the activity of my application goes to pause or stop state so in this case service should not get destroy.
I am not sure how to make it possible because as of now what I observed is whenever I pressed the back button of the phone when I am the first activity of the application, application’s service is also get closed.
Try using the Remote Service which is not bound to an activity.
http://developer.android.com/reference/android/app/Service.html
http://developer.android.com/guide/topics/fundamentals/services.html