title: Android activity dropped event, application not responding
body: <p>I'm relatively new to android programming and I'm trying to write an application in which I want to start an activity from a BroadcastReceiver that is listening to the call state. In practice, I want to start an activity when a call is made. What I'm doing now is the following:</p>
  
  <pre><code>    public class ServiceReceiver extends BroadcastReceiver {
  
  
      @Override
      public void onReceive(final Context context, Intent intent) {
          TelephonyManager telephony = (TelephonyManager) context
                  .getSystemService(Context.TELEPHONY_SERVICE);
  
          int state = telephony.getCallState();
  ...
    Intent i = new Intent(context, OnCallActivity.class);
                          i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP
                                  | Intent.FLAG_ACTIVITY_SINGLE_TOP);
                          i.putExtras(bundle);
  
                          context.startActivity(i);
  
  }
  </code></pre>
  
  <p>The activity started does nothing right now. I manage to start the activity without any problem, but what I get is an unresponsive app. The app is started, but the events like the back button don't work. I can press it several times without the application reacting and I have to kill it. In logcat here's what I see:</p>
  
  <pre><code> 11-02 13:54:19.651     918-1065/? W/InputDispatcher﹕ Asynchronous input event injection failed.
      11-02 13:54:19.651     918-1065/? I/InputDispatcher﹕ Dropped event because the current application is not responding and the user has started interacting with a different application.
  </code></pre>
  
  <p>Can you at least give me an hint to understand what can be blocking my application? I tried strict mode, but I got nothing significant. Thanks in advance. </p>