List of usage examples for android.provider Settings ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS
String ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS
To view the source code for android.provider Settings ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS.
Click Source Link
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 ww w. j a v a2s . 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:org.kde.necessitas.ministro.MinistroActivity.java
private boolean checkFreeSpace(final long size) throws InterruptedException { final StatFs stat = new StatFs(m_qtLibsRootPath); if (stat.getBlockSize() * stat.getAvailableBlocks() < size) { runOnUiThread(new Runnable() { public void run() { AlertDialog.Builder builder = new AlertDialog.Builder(MinistroActivity.this); builder.setMessage(getResources().getString(R.string.ministro_disk_space_msg, (size - (stat.getBlockSize() * stat.getAvailableBlocks())) / 1024 + "Kb")); builder.setCancelable(true); builder.setNeutralButton(getResources().getString(R.string.settings_msg), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { try { startActivityForResult( new Intent(Settings.ACTION_MANAGE_APPLICATIONS_SETTINGS), freeSpaceCode); } catch (Exception e) { e.printStackTrace(); try { startActivityForResult( new Intent(Settings.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS), freeSpaceCode); } catch (Exception e1) { e1.printStackTrace(); }//from w w w .j a v a 2s. c o m } } }); builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.dismiss(); m_diskSpaceSemaphore.release(); } }); builder.setOnCancelListener(new DialogInterface.OnCancelListener() { public void onCancel(DialogInterface dialog) { dialog.dismiss(); m_diskSpaceSemaphore.release(); } }); m_distSpaceDialog = builder.create(); m_distSpaceDialog.show(); } }); m_diskSpaceSemaphore.acquire(); } else return true; return stat.getBlockSize() * stat.getAvailableBlocks() > size; }
From source file:com.android.settings.applications.CanBeOnSdCardChecker.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setHasOptionsMenu(true);// w w w.j av a2 s .c o m mApplicationsState = ApplicationsState.getInstance(getActivity().getApplication()); Intent intent = getActivity().getIntent(); String action = intent.getAction(); int defaultListType = LIST_TYPE_DOWNLOADED; String className = getArguments() != null ? getArguments().getString("classname") : null; if (className == null) { className = intent.getComponent().getClassName(); } if (className.equals(RunningServicesActivity.class.getName()) || className.endsWith(".RunningServices")) { defaultListType = LIST_TYPE_RUNNING; } else if (className.equals(StorageUseActivity.class.getName()) || Intent.ACTION_MANAGE_PACKAGE_STORAGE.equals(action) || className.endsWith(".StorageUse")) { mSortOrder = SORT_ORDER_SIZE; defaultListType = LIST_TYPE_ALL; } else if (Settings.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS.equals(action)) { // Select the all-apps list, with the default sorting defaultListType = LIST_TYPE_ALL; } if (savedInstanceState != null) { mSortOrder = savedInstanceState.getInt(EXTRA_SORT_ORDER, mSortOrder); int tmp = savedInstanceState.getInt(EXTRA_DEFAULT_LIST_TYPE, -1); if (tmp != -1) defaultListType = tmp; mShowBackground = savedInstanceState.getBoolean(EXTRA_SHOW_BACKGROUND, false); } mDefaultListType = defaultListType; final Intent containerIntent = new Intent().setComponent(StorageMeasurement.DEFAULT_CONTAINER_COMPONENT); getActivity().bindService(containerIntent, mContainerConnection, Context.BIND_AUTO_CREATE); mInvalidSizeStr = getActivity().getText(R.string.invalid_size_value); mComputingSizeStr = getActivity().getText(R.string.computing_size); TabInfo tab = new TabInfo(this, mApplicationsState, getActivity().getString(R.string.filter_apps_third_party), LIST_TYPE_DOWNLOADED, this, savedInstanceState); mTabs.add(tab); if (!Environment.isExternalStorageEmulated()) { tab = new TabInfo(this, mApplicationsState, getActivity().getString(R.string.filter_apps_onsdcard), LIST_TYPE_SDCARD, this, savedInstanceState); mTabs.add(tab); } tab = new TabInfo(this, mApplicationsState, getActivity().getString(R.string.filter_apps_running), LIST_TYPE_RUNNING, this, savedInstanceState); mTabs.add(tab); tab = new TabInfo(this, mApplicationsState, getActivity().getString(R.string.filter_apps_all), LIST_TYPE_ALL, this, savedInstanceState); mTabs.add(tab); tab = new TabInfo(this, mApplicationsState, getActivity().getString(R.string.filter_apps_disabled), LIST_TYPE_DISABLED, this, savedInstanceState); mTabs.add(tab); mNumTabs = mTabs.size(); }
From source file:com.android.launcher2.Launcher.java
@Override public boolean onCreateOptionsMenu(Menu menu) { if (isWorkspaceLocked()) { return false; }//from w w w . j av a 2 s .c o m super.onCreateOptionsMenu(menu); Intent manageApps = new Intent(Settings.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS); manageApps.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); Intent settings = new Intent(android.provider.Settings.ACTION_SETTINGS); settings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); String helpUrl = getString(R.string.help_url); Intent help = new Intent(Intent.ACTION_VIEW, Uri.parse(helpUrl)); help.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); menu.add(MENU_GROUP_WALLPAPER, MENU_WALLPAPER_SETTINGS, 0, R.string.menu_wallpaper) .setIcon(android.R.drawable.ic_menu_gallery).setAlphabeticShortcut('W'); menu.add(0, MENU_MANAGE_APPS, 0, R.string.menu_manage_apps).setIcon(android.R.drawable.ic_menu_manage) .setIntent(manageApps).setAlphabeticShortcut('M'); menu.add(0, MENU_SYSTEM_SETTINGS, 0, R.string.menu_settings).setIcon(android.R.drawable.ic_menu_preferences) .setIntent(settings).setAlphabeticShortcut('P'); if (!helpUrl.isEmpty()) { menu.add(0, MENU_HELP, 0, R.string.menu_help).setIcon(android.R.drawable.ic_menu_help).setIntent(help) .setAlphabeticShortcut('H'); } return true; }