80,349
社区成员
发帖
与我相关
我的任务
分享
onStart()
public void onStart(Intent intent, int startId) {
}
public int onStartCommand(Intent intent, int flags, int startId) {
onStart(intent, startId);
return mStartCompatibility ? START_STICKY_COMPATIBILITY : START_STICKY;
}
void onStart(Intent intent, int startId)
This method is deprecated. Implement onStartCommand(Intent, int, int) instead.
onStart方式已经过时,被onStartCommand取代
int onStartCommand(Intent intent, int flags, int startId)
Called by the system every time a client explicitly starts the service by calling startService(Intent),
providing the arguments it supplied and a unique integer token representing the start request.