브로드캐스트에서 서비스를 시작하고
해당 서비스 작업이 끝나면 자동으로 끝나야 하는거 아닌가요?
작업이 끝났는데도 ondestroy가 안불러와져서
고민입니다.
다른분들도 stopService는 별도로 구현안하시나요?
private int startIdx;
.
.
.
.
startIdx = startId;
for(int i =0; i < 20; i++){
thread.sleep(2000);
}
stopSelf(startIdx);
@Override
public void onDestroy() {
super.onDestroy();
Log.v(TAG, "onDestroy id : " + startIdx);
}
이렇게 되면 stopSelf1, stopSelf2, stopSelf3 이 순서대로 나와야 하지 않나요?
이게 안나오고 한개만 나와요