title: How to detect a MEDIA_BUTTON double click?
body: <p>It seems to be easy and should look like:</p>
  
  <pre><code>private long DOUBLE_CLICK_DELAY = 150;
  private long lastButtonClick = // oldValue
  private long currentButtonClick = System.currentTimeMillis();
  ...
  if (currentButtonClick - lastButtonClick &lt; DOUBLE_CLICK_DELAY ) // bla-bla
  </code></pre>
  
  <p>but I can't save the old value of previuous click in a BroadcastReceiver. Should I save it in a temporary database o something? (No activity used)</p>
  
  <pre><code>public class RemoteControlReceiver extends BroadcastReceiver {
  
  @Override
    public void onReceive(Context context, Intent intent) {
      if (Intent.ACTION_MEDIA_BUTTON.equals(intent.getAction())) {
        if (/* DOUBLE_CLICK */){
          Toast.makeText(context, "Tra-la-la!", 100).show();      
        }
      }
    } 
  
  }
  </code></pre>