문제

Will the Android OS kill my IntentService under normal circumstances or do I need to worry about any variables being reset?

도움이 되었습니까?

해결책

Will the Android OS kill my IntentService under normal circumstances

Yes. IntentServices will be paused,stopped and destroyed when there are no waiting intents at the whim of the OS.

do I need to worry about any variables being reset?

There are no guarantees about variable values being retained. You should use onCreate to configure the initial state of the service and, in my experience, it works best if you don't maintain state outside of the lifecycle of the service.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top