According to this blog post and the documentation of onStartCommand()
if you have a Service you should implement onStart() and onStartCommand() and in 2.0 and higher only onStartCommand() will be called. It seems that this is not the case and in my Service BOTH are being called. This was a problem as it was trying to do the work twice, so I had to add a check in onStart() to not do anything if the OS version was < 2.0. This seems like a hack and a bug. Anyone else experience this or do I maybe have something wrong? I cut and pasted the code right from the sample.
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Util.log(mCtx, "AlerterService", "onStartCommand() called");
handleStart(intent);
return super.onStartCommand(intent, flags, startId);
}
public void onStart(Intent intent, int startId) {
Util.log(mCtx, "AlerterService", "onStart() called");
handleStart(intent);
super.onStart(intent, startId);
}