how to use delete intent to perform some action on clear notification?
<p>I want to reset a variable of my service when user clears my notification: that's all!</p>

<p>Looking around I see that everyone suggest to add a delete intent on my notification, but intent is used to start an activity, a service o whatever while I just need a thing like this:</p>

<pre><code>void onClearPressed(){
   aVariable = 0;
}
</code></pre>

<p>how to obtain this result?</p>
