问题
I have created a service and returned "START_REDELIVERY_INTENT" in "onStartCommand()" method, as i want to run the service even after destroying the App's MainActivity.
App should restart just after destroying the App with previous non-null intent. But App is taking some time to restart. We can see the status of restarting App in device setting (Below is snapshot). This snapshot is after destroying App..... What i do? Any Help please?
public int onStartCommand(Intent intent, int flags, int startId) {
// TODO Auto-generated method stub
super.onStartCommand(intent, flags, startId);
Log.d(TAG, "intent: "+intent);
return START_REDELIVER_INTENT;
}
来源:https://stackoverflow.com/questions/27398487/android-service-is-restarting-slowly