I am trying to detect keyboard is active or not (Outside my application) using accessibility service. For that i tried to read the notifications "choose keyboard" (When multiple key board are enabled). Following code is used.

```
public class KeyboardWatcher extends AccessibilityService {

boolean isConnected = false;
@Override
public void onAccessibilityEvent(AccessibilityEvent event) {
    if (event.getEventType() == AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED) {
        final String packagename = String.valueOf(event.getPackageName());
        Log.d("Package", packagename);
        String msg = "";            
        List<CharSequence> s = event.getText();
        if(s.iterator().hasNext())
        {
            msg += s.iterator().next().toString();
            Log.d("MSG", msg);

        }else{
            Log.d("TYPE", event.getEventType()+"");
        }
    }else{
        Log.d("EVENT TYPE__",event.getEventType()+"");
        final String packagename = String.valueOf(event.getPackageName());
        Log.d("PNE", packagename);          
    }

}
protected void onServiceConnected() {

    if (isConnected) {
        return;
    }       
    AccessibilityServiceInfo info = new AccessibilityServiceInfo();
    info.eventTypes = AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED;
    info.feedbackType = AccessibilityServiceInfo.FEEDBACK_ALL_MASK;
    setServiceInfo(info);
    isConnected = true;
} 
}

```

Now all notifications are logged by the application except "keyboard chooser" notification. How to read that notification, is that possible.

Thanks