문제

Is it possible to start a service multiple times. Means calling startService multiple times. I know if I call startService , it'll call onCreate() -> onStartCommand(). on startService, it calls only onStartCommand() without onCreate(). What happens to the service ? Is it creating multiple instance of the service ?

도움이 되었습니까?

해결책

No, the Service will only run in one instance. However, every time you start the service, the onStartCommand() method is called. Look at this documentation.

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