: 한 번만 발생 작업에 대해 이야기 할 때(취소) 및 정기 예약 된 작업 안드로이드 데브 참조에서
public abstract boolean cancel (boolean mayInterruptIfRunning)
If the task has already started, then the mayInterruptIfRunning parameter
determines whether the thread executing this task should be interrupted in
an attempt to stop the task.
이것은 나를 위해 분명하다. 하지만, 정기적 인 작업이있을 때, 현재의 "작업"을 끝내고 싶지만 새로운 작업을 시작하지 않으려 고합니다.
나도 똑바로 바로 사용할 수없는 것이 맞습니까? 인수를 true로 설정하면 현재 작업이 끝나기 전에 중지되고, false로 변경하면 현재 실행중인 작업이있는 것으로 간주됩니다. 이게 옳은 거니?
내가 원하는 것을 어떻게 구현합니까? 어떻게 든 실행 중인지 찾기 위해 작업을 폴링해야하고, 그렇지 않을 때 취소할까요?