I\'m using following code to stop my service
Intent intent = new Intent(MainActivity.this, UsageRecorderService.class); stopService(intent);
An
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.