Java Code Examples for android.provider.Settings#ACTION_SETTINGS

The following examples show how to use android.provider.Settings#ACTION_SETTINGS . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
private Action getSettingsAction() {
    return new SinglePressAction(com.android.internal.R.drawable.ic_settings,
            R.string.global_action_settings) {

        @Override
        public void onPress() {
            Intent intent = new Intent(Settings.ACTION_SETTINGS);
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
            mContext.startActivity(intent);
        }

        @Override
        public boolean showDuringKeyguard() {
            return true;
        }

        @Override
        public boolean showBeforeProvisioning() {
            return true;
        }
    };
}
 
Example 2
Source Project: TikTok   File: NetworkUtil.java    License: Apache License 2.0 6 votes vote down vote up
/**
     * 打开系统设置界面
     */
    public static void openSetting(Activity activity) {
//        Intent intent = new Intent("/");
//        ComponentName cm = new ComponentName("com.android.settings",
//                "com.android.settings.WirelessSettings");
//        intent.setComponent(cm);
//        intent.setAction("android.intent.action.VIEW");
//        activity.startActivityForResult(intent, 0);

        //打开移动网络设置界面
//        Intent intent =  new Intent(Settings.ACTION_DATA_ROAMING_SETTINGS);
//        activity.startActivity(intent);

        Intent intent = new Intent(Settings.ACTION_SETTINGS);
        activity.startActivity(intent);

    }
 
Example 3
Source Project: DevUtils   File: IntentUtils.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * 获取跳转到系统设置的意图
 * @param isNewTask 是否开启新的任务栈
 * @return 跳转到系统设置的意图
 */
public static Intent getSystemSettingIntent(final boolean isNewTask) {
    try {
        Intent intent = new Intent(Settings.ACTION_SETTINGS);
        return getIntent(intent, isNewTask);
    } catch (Exception e) {
        LogPrintUtils.eTag(TAG, e, "getSystemSettingIntent");
    }
    return null;
}
 
Example 4
@Override
protected void onResume() {
    super.onResume();
    disposable = new CompositeDisposable();
    if (nfcManager.verifyNFC())
        init();
    else {
        Intent setnfc = new Intent(Settings.ACTION_SETTINGS);
        startActivity(setnfc);
    }


}
 
Example 5
Source Project: HayaiLauncher   File: SearchActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle item selection
    switch (item.getItemId()) {
        case R.id.action_settings:
            final Intent intentSettings = new Intent(this, SettingsActivity.class);
            startActivity(intentSettings);
            return true;
        case R.id.action_refresh_app_list:
            recreate();
            return true;
        case R.id.action_system_settings:
            final Intent intentSystemSettings = new Intent(Settings.ACTION_SETTINGS);
            intentSystemSettings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(intentSystemSettings);
            return true;
        case R.id.action_manage_apps:
            final Intent intentManageApps = new Intent(Settings.ACTION_APPLICATION_SETTINGS);
            intentManageApps.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(intentManageApps);
            return true;
        case R.id.action_set_wallpaper:
            final Intent intentWallpaperPicker = new Intent(Intent.ACTION_SET_WALLPAPER);
            startActivity(intentWallpaperPicker);
            return true;
        case R.id.action_about:
            final Intent intentAbout = new Intent(this, AboutActivity.class);
            startActivity(intentAbout);
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}
 
Example 6
Source Project: BaseProject   File: IntentUtil.java    License: MIT License 4 votes vote down vote up
/** 跳转到设置界面 */
public static void setting(@NonNull Context context) {
    Intent intent = new Intent(Settings.ACTION_SETTINGS);
    context.startActivity(intent);
}
 
Example 7
Source Project: BaseProject   File: BaseUiHelper.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * 跳转到系统设置界面
 * @param context
 */
public static void jumpToSystemSetting(Context context) {
    Intent toSettingActionIntent = new Intent(Settings.ACTION_SETTINGS);
    jumpToActivity(context,toSettingActionIntent,0,false);
}
 
Example 8
Source Project: mirror   File: Util.java    License: MIT License 4 votes vote down vote up
/**
 * Launches the system's default settings activity.
 */
public void launchSettings() {
  Intent settingsIntent = new Intent(Settings.ACTION_SETTINGS);
  context.startActivity(settingsIntent);
}