下面是IntentService源混淆关于Android IntentService
@Override
public void onStart(Intent intent, int startId) {
Message msg = mServiceHandler.obtainMessage();
msg.arg1 = startId;
msg.obj = intent;
mServiceHandler.sendMessage(msg);
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
onStart(intent, startId);
return mRedelivery ? START_REDELIVER_INTENT : START_NOT_STICKY;
}
两种方法时,我开始与调试模式intentservice的亚类中,我发现,它调用OnStart方法第一,然后执行onStartCommand方法,但是在onStartCommand方法中,它不会调用“onStart(intent,startId);”
,因为我看到的来源,我认为应该是第一次调用onStartCommond方法,然后做在onStartCommond方法OnStart方法,与上述结果表明,我迷惑的是,有人帮帮我吗?谢谢
为什么要投票? ?? – lgw150