Code example for AccessibilityServiceInfo

0
	@Override public void onServiceConnected() {  
                Toast.makeText(this, "onServiceConnected Notification...", Toast.LENGTH_LONG).show();
 
            System.out.print("***** 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);
		} 
        @Override 
public int onStartCommand(Intent intent, int flags, int startId) {
 
    Toast.makeText(this, "onStartCommand Notification...", Toast.LENGTH_LONG).show();
    Toast.makeText(this, "onServiceConnected Notification...", Toast.LENGTH_LONG).show();
		AccessibilityServiceInfo info = new AccessibilityServiceInfo(); 
		info.eventTypes = AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED; 
		info.notificationTimeout = 100; 
		info.feedbackType = AccessibilityEvent.TYPES_ALL_MASK; 
		setServiceInfo(info);