当前位置: 首页>>代码示例>>Java>>正文


Java AccessibilityServiceInfo.FEEDBACK_ALL_MASK属性代码示例

本文整理汇总了Java中android.accessibilityservice.AccessibilityServiceInfo.FEEDBACK_ALL_MASK属性的典型用法代码示例。如果您正苦于以下问题:Java AccessibilityServiceInfo.FEEDBACK_ALL_MASK属性的具体用法?Java AccessibilityServiceInfo.FEEDBACK_ALL_MASK怎么用?Java AccessibilityServiceInfo.FEEDBACK_ALL_MASK使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.accessibilityservice.AccessibilityServiceInfo的用法示例。


在下文中一共展示了AccessibilityServiceInfo.FEEDBACK_ALL_MASK属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onServiceConnected

@Override
protected void onServiceConnected() {
    AccessibilityServiceInfo info = new AccessibilityServiceInfo();
    // Set the type of events that this service wants to listen to.
    info.eventTypes = AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED;

    // Set package names to listen for or listen for all applications
    //info.packageNames = new String[] {"com.appone.totest.accessibility", "com.apptwo.totest.accessibility"};
 
    // Set the type of feedback your service will provide.
    if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
        info.feedbackType = AccessibilityServiceInfo.FEEDBACK_ALL_MASK;
    }
    else {
        info.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;
    }

    // info.flags = AccessibilityServiceInfo.DEFAULT;

    info.notificationTimeout = 100;
    this.setServiceInfo(info);
}
 
开发者ID:jareddlc,项目名称:OpenFit,代码行数:22,代码来源:NotificationAccessibilityService.java

示例2: onServiceConnected

@Override
public void onServiceConnected() {
    // Set the type of events that this service wants to listen to.  
    //Others won't be passed to this service.
    Log.d("Accessibility Service", "Accessibilty Service Connected");
    info.eventTypes = AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED;

    // If you only want this service to work with specific applications, set their
    // package names here.  Otherwise, when the service is activated, it will listen
    // to events from all applications.
    //info.packageNames = new String[]
    //{"com.appone.totest.accessibility", "com.apptwo.totest.accessibility"};

    // Set the type of feedback your service will provide.
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
        info.feedbackType = AccessibilityServiceInfo.FEEDBACK_ALL_MASK;
    } else {
        info.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;
    }

    // Default services are invoked only if no package-specific ones are present
    // for the type of AccessibilityEvent generated.  This service *is*
    // application-specific, so the flag isn't necessary.  If this was a
    // general-purpose service, it would be worth considering setting the
    // DEFAULT flag.

    // info.flags = AccessibilityServiceInfo.DEFAULT;

    info.notificationTimeout = 100;

    this.setServiceInfo(info);
}
 
开发者ID:applecool,项目名称:Buzz-smartband,代码行数:32,代码来源:MyAccessibilityService.java

示例3: onServiceConnected

@Override
protected void onServiceConnected() {
    AccessibilityServiceInfo info = new AccessibilityServiceInfo();
    info.eventTypes = AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED | AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED;
    info.feedbackType = AccessibilityServiceInfo.FEEDBACK_ALL_MASK;
    info.notificationTimeout = 100;
    setServiceInfo(info);
    rifle = new Rifle(getApplicationContext());
}
 
开发者ID:micronic,项目名称:pullbullet,代码行数:9,代码来源:AccessService.java


注:本文中的android.accessibilityservice.AccessibilityServiceInfo.FEEDBACK_ALL_MASK属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。