Stop service in an activity

后端 未结 3 719
独厮守ぢ
独厮守ぢ 2021-01-23 01:25

I\'m using following code to stop my service

Intent intent = new Intent(MainActivity.this, UsageRecorderService.class);
stopService(intent);

An

3条回答
  •  佛祖请我去吃肉
    2021-01-23 01:37

    An IntentService is designed to stop itself only when all the requests present in the work queue have been handled.Android stops the service after all start requests have been handled.

提交回复
热议问题