Example usage for android.provider Settings ACTION_ACCESSIBILITY_SETTINGS

List of usage examples for android.provider Settings ACTION_ACCESSIBILITY_SETTINGS

Introduction

In this page you can find the example usage for android.provider Settings ACTION_ACCESSIBILITY_SETTINGS.

Prototype

String ACTION_ACCESSIBILITY_SETTINGS

To view the source code for android.provider Settings ACTION_ACCESSIBILITY_SETTINGS.

Click Source Link

Document

Activity Action: Show settings for accessibility modules.

Usage

From source file:Main.java

public static void GoSetting(Activity activity) {
    Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
    activity.startActivity(intent);
}

From source file:Main.java

public static void startService(Context context) {
    context.startActivity(new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS));
}

From source file:Main.java

public static void enableAccess(Context context) {
    Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(intent);// ww  w . j  a v  a  2  s.c o m
}

From source file:Main.java

public static void goToAccessibilitySetting(Context context) {
    context.startActivity(//  ww  w .java  2  s.  co m
            new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
}

From source file:Main.java

public static boolean gotoAccessibilitySettings(Context context) {
    Intent settingsIntent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
    if (!(context instanceof Activity)) {
        settingsIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    }/*from w ww . ja v  a  2 s  .c  o m*/
    boolean isOk = true;
    try {
        context.startActivity(settingsIntent);
    } catch (ActivityNotFoundException e) {
        isOk = false;
    }
    return isOk;
}

From source file:com.phonegap.plugins.nativesettings.NativeSettings.java

@Override
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
    PluginResult.Status status = PluginResult.Status.OK;
    Uri packageUri = Uri.parse("package:" + this.cordova.getActivity().getPackageName());
    String result = "";

    //Information on settings can be found here:
    //http://developer.android.com/reference/android/provider/Settings.html

    action = args.getString(0);//from   w w  w  .  j  a  v  a2 s  .c o m
    Intent intent = null;

    if (action.equals("accessibility")) {
        intent = new Intent(android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS);
    } else if (action.equals("account")) {
        intent = new Intent(android.provider.Settings.ACTION_ADD_ACCOUNT);
    } else if (action.equals("airplane_mode")) {
        intent = new Intent(android.provider.Settings.ACTION_AIRPLANE_MODE_SETTINGS);
    } else if (action.equals("apn")) {
        intent = new Intent(android.provider.Settings.ACTION_APN_SETTINGS);
    } else if (action.equals("application_details")) {
        intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS, packageUri);
    } else if (action.equals("application_development")) {
        intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS);
    } else if (action.equals("application")) {
        intent = new Intent(android.provider.Settings.ACTION_APPLICATION_SETTINGS);
    }
    //else if (action.equals("battery_saver")) {
    //    intent = new Intent(android.provider.Settings.ACTION_BATTERY_SAVER_SETTINGS);
    //}
    else if (action.equals("bluetooth")) {
        intent = new Intent(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS);
    } else if (action.equals("captioning")) {
        intent = new Intent(android.provider.Settings.ACTION_CAPTIONING_SETTINGS);
    } else if (action.equals("cast")) {
        intent = new Intent(android.provider.Settings.ACTION_CAST_SETTINGS);
    } else if (action.equals("data_roaming")) {
        intent = new Intent(android.provider.Settings.ACTION_DATA_ROAMING_SETTINGS);
    } else if (action.equals("date")) {
        intent = new Intent(android.provider.Settings.ACTION_DATE_SETTINGS);
    } else if (action.equals("about")) {
        intent = new Intent(android.provider.Settings.ACTION_DEVICE_INFO_SETTINGS);
    } else if (action.equals("display")) {
        intent = new Intent(android.provider.Settings.ACTION_DISPLAY_SETTINGS);
    } else if (action.equals("dream")) {
        intent = new Intent(android.provider.Settings.ACTION_DREAM_SETTINGS);
    } else if (action.equals("home")) {
        intent = new Intent(android.provider.Settings.ACTION_HOME_SETTINGS);
    } else if (action.equals("keyboard")) {
        intent = new Intent(android.provider.Settings.ACTION_INPUT_METHOD_SETTINGS);
    } else if (action.equals("keyboard_subtype")) {
        intent = new Intent(android.provider.Settings.ACTION_INPUT_METHOD_SUBTYPE_SETTINGS);
    } else if (action.equals("storage")) {
        intent = new Intent(android.provider.Settings.ACTION_INTERNAL_STORAGE_SETTINGS);
    } else if (action.equals("locale")) {
        intent = new Intent(android.provider.Settings.ACTION_LOCALE_SETTINGS);
    } else if (action.equals("location")) {
        intent = new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);
    } else if (action.equals("manage_all_applications")) {
        intent = new Intent(android.provider.Settings.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS);
    } else if (action.equals("manage_applications")) {
        intent = new Intent(android.provider.Settings.ACTION_MANAGE_APPLICATIONS_SETTINGS);
    } else if (action.equals("memory_card")) {
        intent = new Intent(android.provider.Settings.ACTION_MEMORY_CARD_SETTINGS);
    } else if (action.equals("network")) {
        intent = new Intent(android.provider.Settings.ACTION_NETWORK_OPERATOR_SETTINGS);
    } else if (action.equals("nfcsharing")) {
        intent = new Intent(android.provider.Settings.ACTION_NFCSHARING_SETTINGS);
    } else if (action.equals("nfc_payment")) {
        intent = new Intent(android.provider.Settings.ACTION_NFC_PAYMENT_SETTINGS);
    } else if (action.equals("nfc_settings")) {
        intent = new Intent(android.provider.Settings.ACTION_NFC_SETTINGS);
    }
    //else if (action.equals("notification_listner")) {
    //    intent = new Intent(android.provider.Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS);
    //}
    else if (action.equals("print")) {
        intent = new Intent(android.provider.Settings.ACTION_PRINT_SETTINGS);
    } else if (action.equals("privacy")) {
        intent = new Intent(android.provider.Settings.ACTION_PRIVACY_SETTINGS);
    } else if (action.equals("quick_launch")) {
        intent = new Intent(android.provider.Settings.ACTION_QUICK_LAUNCH_SETTINGS);
    } else if (action.equals("search")) {
        intent = new Intent(android.provider.Settings.ACTION_SEARCH_SETTINGS);
    } else if (action.equals("security")) {
        intent = new Intent(android.provider.Settings.ACTION_SECURITY_SETTINGS);
    } else if (action.equals("settings")) {
        intent = new Intent(android.provider.Settings.ACTION_SETTINGS);
    } else if (action.equals("show_regulatory_info")) {
        intent = new Intent(android.provider.Settings.ACTION_SHOW_REGULATORY_INFO);
    } else if (action.equals("sound")) {
        intent = new Intent(android.provider.Settings.ACTION_SOUND_SETTINGS);
    } else if (action.equals("store")) {
        intent = new Intent(Intent.ACTION_VIEW,
                Uri.parse("market://details?id=" + this.cordova.getActivity().getPackageName()));
    } else if (action.equals("sync")) {
        intent = new Intent(android.provider.Settings.ACTION_SYNC_SETTINGS);
    } else if (action.equals("usage")) {
        intent = new Intent(android.provider.Settings.ACTION_USAGE_ACCESS_SETTINGS);
    } else if (action.equals("user_dictionary")) {
        intent = new Intent(android.provider.Settings.ACTION_USER_DICTIONARY_SETTINGS);
    } else if (action.equals("voice_input")) {
        intent = new Intent(android.provider.Settings.ACTION_VOICE_INPUT_SETTINGS);
    } else if (action.equals("wifi_ip")) {
        intent = new Intent(android.provider.Settings.ACTION_WIFI_IP_SETTINGS);
    } else if (action.equals("wifi")) {
        intent = new Intent(android.provider.Settings.ACTION_WIFI_SETTINGS);
    } else if (action.equals("wireless")) {
        intent = new Intent(android.provider.Settings.ACTION_WIRELESS_SETTINGS);
    } else {
        status = PluginResult.Status.INVALID_ACTION;
        callbackContext.sendPluginResult(new PluginResult(status, result));
        return false;
    }

    if (args.length() > 1 && args.getBoolean(1)) {
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    }
    this.cordova.getActivity().startActivity(intent);

    callbackContext.sendPluginResult(new PluginResult(status, result));
    return true;
}

From source file:com.ldzs.redpackets.ui.dialog.AlertDialogFragment.java

@NonNull
@Override//from w w  w.  j a  va  2  s.  c o  m
public Dialog onCreateDialog(Bundle savedInstanceState) {
    AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.MyAlertDialogStyle);
    builder.setTitle(R.string.open_service_title);
    builder.setMessage(R.string.open_service_sub_info);
    View view = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_open_service, null);
    layout = (RelativeLayout) view.findViewById(R.id.rl_container);
    builder.setView(view);
    builder.setPositiveButton(R.string.open_service, (dialog, which) -> {
        // 
        Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
        startActivity(intent);
        dismiss();
    });
    //        loadBannerAd();
    return builder.create();
}

From source file:com.hrs.filltheform.main.PermissionsManager.java

public static void openAccessibilitySettings(AppCompatActivity activity) {
    Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
    activity.startActivity(intent);//  w w w.  j a v  a2 s . c o  m
}

From source file:com.yangtsaosoftware.pebblemessenger.activities.SettingFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    prefs = PreferenceManager.getDefaultSharedPreferences(_context);
    addPreferencesFromResource(R.xml.preference);
    Preference butAccessbility = findPreference("pref_button_accessibility");
    butAccessbility.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
        @Override/*w ww . j a v a 2s  .co  m*/
        public boolean onPreferenceClick(Preference preference) {
            startActivity(new Intent(Settings.ACTION_SECURITY_SETTINGS));
            return true;
        }
    });
    Preference butPebbleApp = findPreference("pref_button_app");
    butPebbleApp.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
        @Override
        public boolean onPreferenceClick(Preference preference) {
            Intent i = new Intent(Intent.ACTION_VIEW);
            i.setData(Uri.parse(Constants.PEBBLE_APP_URL));
            startActivity(i);
            return true;
        }
    });

    Preference butSetuptts = findPreference("pref_button_setuptts");
    butSetuptts.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
        @Override
        public boolean onPreferenceClick(Preference preference) {
            startActivity(new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS));
            return true;
        }
    });

}

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

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_edit_notification);
    mHandler = new Handler();

    lvPackages = (ListView) findViewById(R.id.listPackages);
    spMode = (Spinner) findViewById(R.id.spMode);
    tvTaskerNotice = (TextView) findViewById(R.id.tvTaskerNotice);
    findViewById(R.id.tvAccessibilityError).setOnClickListener(new OnClickListener() {
        @Override// www . java2 s  . com
        public void onClick(View v) {
            startActivity(new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS));
        }
    });

    ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.mode_choices,
            android.R.layout.simple_spinner_item);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spMode.setAdapter(adapter);
    spMode.setOnItemSelectedListener(new OnItemSelectedListener() {
        @Override
        public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
            mMode = Constants.Mode.values()[pos];
        }

        @Override
        public void onNothingSelected(AdapterView<?> parent) {
            mMode = Constants.Mode.OFF;
            if (Constants.IS_LOGGABLE) {
                Log.i(Constants.LOG_TAG, "Mode is: off");
            }
        }
    });

}