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


Java Settings.ACTION_ACCESSIBILITY_SETTINGS属性代码示例

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


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

示例1: checkEnabledAccessibilityService

private boolean checkEnabledAccessibilityService() {
    if(isAccessibilitySettingsOn(this))
        return true;;
    List<AccessibilityServiceInfo> accessibilityServices =
            mAccessibilityManager.getEnabledAccessibilityServiceList(AccessibilityServiceInfo.FEEDBACK_ALL_MASK);
    for (AccessibilityServiceInfo info : accessibilityServices) {
        if (info.getId().equals(SERVICE_NAME)) {
            log.d(info.getId()+" "+info.toString());
            return true;
        }
    }
    Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(intent);
    return false;
}
 
开发者ID:yippeesoft,项目名称:NotifyTools,代码行数:16,代码来源:JumpService.java

示例2: onClick

public void onClick(View v) {
    Intent intent = new Intent();
    switch (v.getId()) {
        case R.id.Accessibility:
            Context context = getApplicationContext();
            CharSequence text = "請激活 MiHomePlus 無障礙設定";
            int duration = Toast.LENGTH_SHORT;
            Toast.makeText(context, text, duration).show();

            //打开系统无障碍设置界面
            Intent accessibleIntent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
            startActivity(accessibleIntent);
            break;
        case R.id.AppSetting:
            intent.setClass(MainActivity.this, AppSetting.class);
            startActivity(intent);
            break;
        case R.id.Help:
            intent.setClass(MainActivity.this, Help.class);
            startActivity(intent);
            break;
        default:
            break;
    }
}
 
开发者ID:qoli,项目名称:MiHomePlus,代码行数:25,代码来源:MainActivity.java

示例3: openSettingAccessibilityNeedTips

private void openSettingAccessibilityNeedTips(Context context) {
        try{
            boolean enable = InstallAccessibility.autoInstallServerEnable();
            Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
            if(!(context instanceof Activity)){
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            }
            context.startActivity(intent);
            if (!enable) {
//                SmartInstallerSettingFloatingWindow.getInstances().showWindow();
//                SmartInstallerSettingFloatingWindow.getInstances().dismissWindowDelayed(10 * 1000);
            }
        }catch(Exception e){
            e.printStackTrace();
        }
    }
 
开发者ID:miLLlulei,项目名称:Accessibility,代码行数:16,代码来源:AccessibilityClearTaskActivity.java

示例4: onReceive

@Override
public void onReceive(Context context, Intent intent) {
    SharedPreferences mSp = PreferenceManager.getDefaultSharedPreferences(context);
    if (intent.getAction().equals(Config.REMOTE_CONTROL_ACTION)) {
        boolean displayToast = intent.getBooleanExtra("RESPOND", true);
        if (BaseMethod.isAccessibilitySettingsOn(context)) {
            BaseMethod.KeyLockBroadcast(context, true, true);
        } else if (mSp.getBoolean(Config.ROOT_OPEN_SERVICE, false) && mSp.getBoolean(Config.ROOT_FUNCTION, false)) {
            BaseMethod.controlAccessibilityServiceWithRoot(true, false);
        } else {
            if (displayToast) {
                Toast.makeText(context, R.string.start_service_first, Toast.LENGTH_SHORT).show();
                Intent access_intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
                context.startActivity(access_intent);
            }
        }
    }
}
 
开发者ID:XFY9326,项目名称:KeyBlocker,代码行数:18,代码来源:RemoteReceiver.java

示例5: checkEnabledAccessibilityService

private boolean checkEnabledAccessibilityService() {
    if(isAccessibilitySettingsOn(this))
        return true;;
    List<AccessibilityServiceInfo> accessibilityServices =
            mAccessibilityManager.getEnabledAccessibilityServiceList(AccessibilityServiceInfo.FEEDBACK_ALL_MASK);
    for (AccessibilityServiceInfo info : accessibilityServices) {
        if (info.getId().equals(SERVICE_NAME)) {
            Log.d("checkAS",info.getId()+" "+info.toString());
            return true;
        }
    }
    Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
    startActivity(intent);
    return false;
}
 
开发者ID:yippeesoft,项目名称:NotifyTools,代码行数:15,代码来源:ForceStopActivity.java

示例6: setAccissibilityService

public void setAccissibilityService(View view){
    try {
        Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
        startActivity(intent);
    }catch (Throwable e){
        Toast.makeText(this,"无法打开系统设置,请手动设置",Toast.LENGTH_SHORT).show();
    }
}
 
开发者ID:l465659833,项目名称:RecentTask,代码行数:8,代码来源:MainActivity.java

示例7: openAccessibility

public void openAccessibility() {
    try {
        Intent accessibleIntent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
        accessibleIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        if (accessibleIntent == null) {
        } else {
            startActivity(accessibleIntent);
        }
    } catch (Exception e) {
        e.printStackTrace();
    }

}
 
开发者ID:kaixuanluo,项目名称:pc-android-controller-android,代码行数:13,代码来源:MainService.java

示例8: onCreate

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
    startActivity(intent);
}
 
开发者ID:WanAndroid,项目名称:GetRedPackets,代码行数:8,代码来源:MainActivity.java

示例9: openAccessibility

public void openAccessibility(View view) {
    try {
        Toast.makeText(this, getString(R.string.turn_on_toast) + pluginStatusText.getText(), Toast.LENGTH_SHORT).show();
        Intent accessibleIntent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
        startActivity(accessibleIntent);
    } catch (Exception e) {
        Toast.makeText(this, getString(R.string.turn_on_error_toast), Toast.LENGTH_LONG).show();
        e.printStackTrace();
    }

}
 
开发者ID:KoreHuang,项目名称:WeChatLuckyMoney,代码行数:11,代码来源:MainActivity.java

示例10: RunAccessibilityService

public static void RunAccessibilityService(Context context) {
    SharedPreferences mSp = PreferenceManager.getDefaultSharedPreferences(context);
    if (mSp.getBoolean(Config.ROOT_OPEN_SERVICE, false) && mSp.getBoolean(Config.ROOT_FUNCTION, false)) {
        controlAccessibilityServiceWithRoot(true, false);
    } else {
        Toast.makeText(context, R.string.start_service_first, Toast.LENGTH_SHORT).show();
        Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);
    }
}
 
开发者ID:XFY9326,项目名称:KeyBlocker,代码行数:11,代码来源:BaseMethod.java

示例11: RestartAccessibilityService

public static void RestartAccessibilityService(Context context) {
    if (isAccessibilitySettingsOn(context)) {
        SharedPreferences mSp = PreferenceManager.getDefaultSharedPreferences(context);
        if (mSp.getBoolean(Config.ROOT_OPEN_SERVICE, false) && mSp.getBoolean(Config.ROOT_FUNCTION, false)) {
            controlAccessibilityServiceWithRoot(false, true);
        } else {
            Toast.makeText(context, R.string.restart_service, Toast.LENGTH_SHORT).show();
            Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
            context.startActivity(intent);
        }
    }
}
 
开发者ID:XFY9326,项目名称:KeyBlocker,代码行数:12,代码来源:BaseMethod.java

示例12: onForwardToAccessibility

public void onForwardToAccessibility(View view)
{
    Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
    startActivity(intent);
}
 
开发者ID:stytooldex,项目名称:stynico,代码行数:5,代码来源:buff_ext.java

示例13: onClick

@Override
public void onClick(View v) {
    Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(intent);
}
 
开发者ID:pengwei1024,项目名称:adb-install-robot,代码行数:6,代码来源:MainActivity.java

示例14: startAccessibilitySettings

public static void startAccessibilitySettings(Context context) {
	Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
	intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
	context.startActivity(intent);
}
 
开发者ID:kranthi0987,项目名称:easyfilemanager,代码行数:5,代码来源:PackageManagerUtils.java

示例15: openAccessibilityUI

public static void openAccessibilityUI(Context context){
    Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(intent);
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:5,代码来源:AceHelper.java


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