title: accessibility service is not started
body: <p>I want to log all toasts events in android ics (4.0.3), but I was unable to log any system event. Service is just not started!</p>
  
  <p>According to this question:
  <a href="https://stackoverflow.com/questions/9158934/onaccessibilityeventaccessibilityevent-event-not-intercepting-notification?lq=1">onAccessibilityEvent(AccessibilityEvent event) not intercepting notification</a></p>
  
  <p><strong>MyAccessibilityService.java</strong></p>
  
  <pre><code>package com.test.toasts2;
  
  import android.accessibilityservice.AccessibilityService;
  import android.accessibilityservice.AccessibilityServiceInfo;
  import android.app.Notification;
  import android.os.Parcelable;
  import android.util.Log;
  import android.view.accessibility.AccessibilityEvent;
  import android.widget.Toast;
  
  public class MyAccessibilityService extends AccessibilityService {
  
  
      public static final String TAG = "volumeMaster";
  
      @Override
      public void onAccessibilityEvent(AccessibilityEvent event)
      {
          Log.v(TAG, "***** onAccessibilityEvent");
          Toast.makeText(getApplicationContext(), "Got event from: " + event.getPackageName(), Toast.LENGTH_LONG).show();
      }
  
      @Override
      public void onInterrupt()
      {
          Log.v(TAG, "***** onInterrupt");
      }
  
      @Override
      public void onServiceConnected()
      {
          Log.v(TAG, "***** onServiceConnected");       
  
  
          AccessibilityServiceInfo info = new AccessibilityServiceInfo();
          info.eventTypes = AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED;
          info.notificationTimeout = 100;
          info.feedbackType = AccessibilityEvent.TYPES_ALL_MASK;
          setServiceInfo(info);
  
      }
  }
  </code></pre>
  
  <p><strong>Toast2Activity.java</strong></p>
  
  <pre><code>package com.test.toasts2;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.widget.Toast;
  
  public class Toast2Activity extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          Intent i = new Intent(this, MyAccessibilityService.class);
          startService(i);
      }
  }
  </code></pre>
  
  <p><strong>AndroidManifest.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.test.toasts2"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk android:minSdkVersion="15" /&gt;
  
      &lt;application
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name" &gt;
  &lt;service android:name=".MyAccessibilityService" android:label="@string/app_name" android:enabled="true" android:exported="false"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.accessibilityservice.AccessibilityService" /&gt;
          &lt;/intent-filter&gt;
  
  &lt;/service&gt;
  
          &lt;activity
              android:name=".Toast2Activity"
              android:label="@string/app_name" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>I included activity tag in manifest (to start service on app start), and also tried to remove. Nothing changed. Service is just not started. I don't get notification in log cat (Log.v in onServiceConected).</p>
  
  <p>I am compiling this as normal app (not system app), android 4.0.3. Am I doing something wrong?</p>
  
  <p>Attached project (may be mistake is somewhere else, or maybe I am compiling it wrong):
  <a href="https://dl.dropbox.com/u/1928109/toast2.zip" rel="noreferrer">https://dl.dropbox.com/u/1928109/toast2.zip</a></p>