Example usage for android.provider Settings ACTION_SETTINGS

List of usage examples for android.provider Settings ACTION_SETTINGS

Introduction

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

Prototype

String ACTION_SETTINGS

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

Click Source Link

Document

Activity Action: Show system settings.

Usage

From source file:Main.java

public static void openSettings(Context context) {
    Intent intent = new Intent(Settings.ACTION_SETTINGS); // Settings.ACTION_WIFI_SETTINGS
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(intent);//from w ww.ja  v a 2s .co m
}

From source file:Main.java

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

From source file:Main.java

public static void toSettingActivity(Context mContext) {
    Intent settingsIntent = new Intent(Settings.ACTION_SETTINGS);
    mContext.startActivity(settingsIntent);
}

From source file:Main.java

@SuppressLint("NewApi")
public static void doSettings(Context context) {
    Intent intent = new Intent(Settings.ACTION_SETTINGS);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(intent);//from w  w  w . jav a2  s  . c  o  m
}

From source file:Main.java

public static void settings(Context context) {
    if (context == null)
        return;//  ww  w  .ja  v  a 2  s.c  om

    try {
        context.startActivity(new Intent(Settings.ACTION_SETTINGS));
    } catch (ActivityNotFoundException e) {
    } catch (Exception e) {
    }
}

From source file:com.commonsware.android.fullscreen.MainActivity.java

private NotificationCompat.Builder buildNormal() {
    NotificationCompat.Builder b = new NotificationCompat.Builder(this);

    b.setAutoCancel(true).setDefaults(Notification.DEFAULT_ALL)
            .setContentTitle(getString(R.string.download_complete)).setContentText(getString(R.string.fun))
            .setContentIntent(buildPendingIntent(Settings.ACTION_SECURITY_SETTINGS))
            .setSmallIcon(android.R.drawable.stat_sys_download_done)
            .setTicker(getString(R.string.download_complete))
            .setFullScreenIntent(buildPendingIntent(Settings.ACTION_DATE_SETTINGS), true)
            .addAction(android.R.drawable.ic_media_play, getString(R.string.play),
                    buildPendingIntent(Settings.ACTION_SETTINGS));

    return (b);/*from  w w w  .  ja  va2 s.  c o  m*/
}

From source file:com.arthurtimberly.fragments.BeamDetailsDialogFragment.java

@SuppressLint("NewApi")
@Override/*  ww  w . ja v  a  2s .  c  o  m*/
public Dialog onCreateDialog(Bundle savedInstanceState) {
    AlertDialog.Builder dialogBuilder = null;

    // AlertDialog.THEME_DEVICE_DEFAULT_LIGHT only available in ICS and above.
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
        dialogBuilder = new AlertDialog.Builder(getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
    } else {
        dialogBuilder = new AlertDialog.Builder(getActivity());

    }

    return dialogBuilder.setTitle(getString(R.string.beam_details__dialog_title))
            .setMessage(R.string.beam_details__dialog_message).setPositiveButton(
                    R.string.beam_details__dialog_button_text, new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int whichButton) {
                            startActivity(new Intent(Settings.ACTION_SETTINGS));
                        }
                    })
            .create();
}

From source file:com.commonsware.android.bignotify.MainActivity.java

private NotificationCompat.Builder buildNormal() {
    NotificationCompat.Builder b = new NotificationCompat.Builder(this);

    b.setAutoCancel(true).setDefaults(Notification.DEFAULT_ALL).setWhen(System.currentTimeMillis())
            .setContentTitle(getString(R.string.download_complete)).setContentText(getString(R.string.fun))
            .setContentIntent(buildPendingIntent(Settings.ACTION_SECURITY_SETTINGS))
            .setSmallIcon(android.R.drawable.stat_sys_download_done)
            .setTicker(getString(R.string.download_complete)).setPriority(Notification.PRIORITY_HIGH)
            .addAction(android.R.drawable.ic_media_play, getString(R.string.play),
                    buildPendingIntent(Settings.ACTION_SETTINGS));

    return (b);//w w w  . java  2  s  .co  m
}

From source file:com.commonsware.android.biglocal.MainActivity.java

private NotificationCompat.Builder buildNormal() {
    NotificationCompat.Builder b = new NotificationCompat.Builder(this);

    b.setAutoCancel(true).setDefaults(Notification.DEFAULT_ALL)
            .setContentTitle(getString(R.string.download_complete)).setContentText(getString(R.string.fun))
            .setContentIntent(buildPendingIntent(Settings.ACTION_SECURITY_SETTINGS))
            .setSmallIcon(android.R.drawable.stat_sys_download_done)
            .setTicker(getString(R.string.download_complete)).setPriority(Notification.PRIORITY_HIGH)
            .setLocalOnly(true).addAction(android.R.drawable.ic_media_play, getString(R.string.play),
                    buildPendingIntent(Settings.ACTION_SETTINGS));

    return (b);//w ww.  j  a  v a2s . c o  m
}

From source file:com.commonsware.android.hcnotify.SillyService.java

private PendingIntent buildContentIntent() {
    Intent i = new Intent(Settings.ACTION_SETTINGS);

    return (PendingIntent.getActivity(this, 0, i, 0));
}