Code example for AccessibilityServiceInfo

0
	 
	@Override 
	public void onInit(int status) { } 
 
	private void setUpAccessibilityType() { 
		AccessibilityServiceInfo info = new AccessibilityServiceInfo();
		info.eventTypes = AccessibilityEvent.TYPES_ALL_MASK;
		info.notificationTimeout = 50;
		info.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC | AccessibilityServiceInfo.FEEDBACK_AUDIBLE |
							AccessibilityServiceInfo.FEEDBACK_HAPTIC | AccessibilityServiceInfo.FEEDBACK_SPOKEN |
							AccessibilityServiceInfo.FEEDBACK_VISUAL;
		info.packageNames = new String[1];
		info.packageNames[0] = getPackageName();  // only handle this package
		setServiceInfo(info);
	} 
	 
	private void startServices() { 
		tts = new TextToSpeech(this, this);
		vibrate = (Vibrator) getSystemService(Service.VIBRATOR_SERVICE);
	}