Example usage for android.accessibilityservice AccessibilityServiceInfo FEEDBACK_VISUAL

List of usage examples for android.accessibilityservice AccessibilityServiceInfo FEEDBACK_VISUAL

Introduction

In this page you can find the example usage for android.accessibilityservice AccessibilityServiceInfo FEEDBACK_VISUAL.

Prototype

int FEEDBACK_VISUAL

To view the source code for android.accessibilityservice AccessibilityServiceInfo FEEDBACK_VISUAL.

Click Source Link

Document

Denotes visual feedback.

Usage

From source file:com.dattasmoon.pebble.plugin.NotificationService.java

@Override
protected void onServiceConnected() {
    // get inital preferences

    watchFile = new File(getFilesDir() + "PrefsChanged.none");
    if (!watchFile.exists()) {
        try {/*w  ww .  j  a  va  2s.  c o  m*/
            watchFile.createNewFile();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        watchFile.setLastModified(System.currentTimeMillis());
    }
    loadPrefs();

    AccessibilityServiceInfo info = new AccessibilityServiceInfo();
    info.feedbackType = AccessibilityServiceInfo.FEEDBACK_VISUAL;
    info.eventTypes = AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED;
    info.notificationTimeout = 100;
    setServiceInfo(info);

    mHandler = new Handler();
    queue = new LinkedList<queueItem>();
}