Code example for Handler

Methods: sendEmptyMessage

0
		} 
	} 
 
	@Override 
	public void onInterrupt() { 
		accessHandler.sendEmptyMessage(STOP);
	} 
	 
	@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);