List of usage examples for android.accessibilityservice AccessibilityServiceInfo FEEDBACK_ALL_MASK
int FEEDBACK_ALL_MASK
To view the source code for android.accessibilityservice AccessibilityServiceInfo FEEDBACK_ALL_MASK.
Click Source Link
From source file:com.myStress.handlers.NotificationHandlerService.java
/** * Called when the service is started (usually after boot). We register the events we are interested in (change of notification) and also register to the start broadcast event, sent by myStress * Originally, we set the package filters to something that does not exist, so that we minimise the firing of the callback * After the start broadcast event will be received, the proper package names will be set for recording * @see android.accessibilityservice.AccessibilityService#onServiceConnected() *//*from w w w .j ava 2 s . co m*/ @Override protected void onServiceConnected() { // register for any input from the accessbility service IntentFilter intentFilter = new IntentFilter("com.myStress.accessibility.start"); registerReceiver(SystemReceiver, intentFilter); // now switch off initially AccessibilityServiceInfo info = new AccessibilityServiceInfo(); info.eventTypes = AccessibilityEvent.TYPES_ALL_MASK; info.feedbackType = AccessibilityServiceInfo.FEEDBACK_ALL_MASK; info.notificationTimeout = 100; Log.e("myStress", "NotificationHandlerService connected"); setServiceInfo(info); Translate.setClientId("myStress"); Translate.setClientSecret("ZwRLv7hsttnjqql26s7MglS8enqHG5Wi+uLfzt7Jsgw="); }