I have an IntentService that is started from an Activity and I would like to be able to stop the service immediately from the activity with a \"cancel\" button in the activi
@Override protected void onHandleIntent(Intent intent) { String action = intent.getAction(); if (action.equals(Action_CANCEL)) { stopSelf(); } else if (action.equals(Action_START)) { //handle } }
Hope it works.