START_STICKY of onStartCommand in Android 6.0.0
问题 I am working with some application which starts a service . When I close app under Android 7.0.0 its service is continue working fine. But under Android 6.0.0 it does not. I use this snippet to keep working service @Override public int onStartCommand(Intent intent, int flags, int startId) { // We want this service to continue running until it is explicitly // stopped, so return sticky. return START_STICKY; } What do I missing here? Code of the service class import android.Manifest; //import