當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。