我一直在查阅文档,有时候onStartCommand()
返回 START_NOT_STICKY
,有时候返回以下内容:
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
// TODO Auto-generated method stub
return super.onStartCommand(intent, flags, startId);
}
我现在很困惑,为什么有些服务会返回 super.onStartCommand(intent, flags, startId);
onStartCommand()
方法,那么默认会返回什么值?系统将如何对待我的服务以进行重新启动/停止? - KushalSTART_STICKY
。 - CopsOnRoad