I am starting a service (or re-starting the running service) when an activity is launched, using :
Intent intent = new Intent(this, MyService.class); startService(intent); Later on based on certain actions, the same activity binds to the service using bindService(new Intent(this, MyService.class), mConnection, Context.BIND_AUTO_CREATE); And when the activity is destroyed, I call unbindService(mConnection); Earlier, the service used to restart when I killed the same activity/application from the application tray and showed the "message 1 process 1 service running" under running apps. Now, the service does not restart on killing the same activity/application. And I get the message *"0 process 1 service running"*, which means the service is actually not running. The service does not restart on application being closed. My application consists of one activity. Also the service is successfully started when launched after a system boot. Why does the process of the service gets killed when I start it using startService() ?? I have noticed the same results with good apps, like Watsapp. I test this on nexus 4 with 4.4.2 build KOT49H <https://lh4.googleusercontent.com/-OFRJIuuDYhg/Uq1wFEjWAiI/AAAAAAAAG1w/YbzVRG9UTlM/s1600/Screenshot_2013-12-15-02-56-30%5B1%5D.png> -- 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

