Android Context Check isAccessibilityEnabled(Context context, String id)

Here you can find the source of isAccessibilityEnabled(Context context, String id)

Description

is Accessibility Enabled

Declaration

public static boolean isAccessibilityEnabled(Context context, String id) 

Method Source Code

//package com.java2s;

import java.util.List;

import android.accessibilityservice.AccessibilityServiceInfo;

import android.content.Context;

import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;

public class Main {
    public static boolean isAccessibilityEnabled(Context context, String id) {
        AccessibilityManager am = (AccessibilityManager) context
                .getSystemService(Context.ACCESSIBILITY_SERVICE);
        List<AccessibilityServiceInfo> runningServices = am
                .getEnabledAccessibilityServiceList(AccessibilityEvent.TYPES_ALL_MASK);
        for (AccessibilityServiceInfo service : runningServices) {
            if (id.equals(service.getId())) {
                return true;
            }/*from w  w  w .j  av a 2  s  .c  o m*/
        }

        return false;
    }
}

Related

  1. hasNotificationPermission(Context context)
  2. hasOtherSPAppsInstalled(Context context)
  3. hasTelephony(@Nonnull Context context)
  4. hasVibrationPermission(Context context)
  5. is3G(Context context)
  6. isAppInstalled(Context context)
  7. isAppInstalled(Context context, String uri)
  8. isAppOnForeground(Context context)
  9. isApplicationBroughtToBackground( final Context context)