de><a href="../../reference/android/accessibilityservice/AccessibilityService.html#onServiceConnected()">onServiceConnected()</a></code> method
and configure your service in there.</p>

<pre>
&#64;Override
public void onServiceConnected() {
    // Set the type of events that this service wants to listen to.  Others
    // won't be passed to this service.
    info.eventTypes = AccessibilityEvent.TYPE_VIEW_CLICKED |
            AccessibilityEvent.TYPE_VIEW_FOCUSED;

    // If you only want this service to wor