Tuesday, January 19, 2016

Difference START_STICKY and START_NOT_STICKY in android

Difference:
the system will try to re-create your service after it is killed
the system will not try to re-create your service after it is killed

Standard example:
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
    return START_STICKY;
}

No comments:

Post a Comment