- AndroProgrammer
- How To change System Settings in Android ?
- Settings.System
- Class Overview
- Summary
- Constants
- public static final String ACCELEROMETER_ROTATION
- public static final String ADB_ENABLED
- public static final String AIRPLANE_MODE_ON
- public static final String AIRPLANE_MODE_RADIOS
- public static final String ALARM_ALERT
- public static final String ALWAYS_FINISH_ACTIVITIES
- public static final String ANDROID_ID
- public static final String ANIMATOR_DURATION_SCALE
- public static final String APPEND_FOR_LAST_AUDIBLE
- public static final String AUTO_TIME
- public static final String AUTO_TIME_ZONE
- public static final String BLUETOOTH_DISCOVERABILITY
- public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT
- public static final String BLUETOOTH_ON
- public static final String DATA_ROAMING
- public static final String DATE_FORMAT
- public static final String DEBUG_APP
- public static final String DEVICE_PROVISIONED
- public static final String DIM_SCREEN
- public static final String DTMF_TONE_WHEN_DIALING
- public static final String END_BUTTON_BEHAVIOR
AndroProgrammer
How To change System Settings in Android ?
How to make System Changes ?
OR How To Change Brightness from my application ? etc.
To make System application or part of it you have to Change certain parameters in Android Settings. Let’s say somehow you have to make some changes in system configuration like display brightness or Ring tone volume from your application. So here is solution require for your application or Part of it. There are number of application in the market who have used these things in application (Tasker etc.). so now you can also integrate it in your application also or using it you can create some awesome apps.
- Create New Application and give name it System Settings and Do next.
- minSdkVersion=»17”
- targetSdkVersion=»17″.
- Give activity name – Main.java and main.xml.
- Go to main.xml and post the below code it contains,
- Two Seek bar for brightness and volume.
- Two Buttons and Two Text view. (Check below screen recording for further layout.)
- onStartTrackingTouch.
- onStopTrackingTouch .
- onProgressChanged.
We can get Seek bar value In onProgressChanged method. Now Paste below code in Main.java class file and make sure you put code as it is.
To make this changes in settings you have to use certain permissions. So go to mainefest file and add these permissions.
Источник
Settings.System
Class Overview
System settings, containing miscellaneous system preferences. This table holds simple name/value pairs. There are convenience functions for accessing individual settings entries.
Summary
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ACCELEROMETER_ROTATION | Control whether the accelerometer will be used to change screen orientation. | |||||||||
String | ADB_ENABLED | This constant was deprecated in API level 3. Use ADB_ENABLED instead | |||||||||
String | AIRPLANE_MODE_ON | This constant was deprecated in API level 17. Use AIRPLANE_MODE_ON instead | |||||||||
String | AIRPLANE_MODE_RADIOS | This constant was deprecated in API level 17. Use AIRPLANE_MODE_RADIOS instead | |||||||||
String | ALARM_ALERT | Persistent store for the system-wide default alarm alert. | |||||||||
String | ALWAYS_FINISH_ACTIVITIES | This constant was deprecated in API level 17. Use ALWAYS_FINISH_ACTIVITIES instead | |||||||||
String | ANDROID_ID | This constant was deprecated in API level 3. Use ANDROID_ID instead | |||||||||
String | ANIMATOR_DURATION_SCALE | This constant was deprecated in API level 17. Use ANIMATOR_DURATION_SCALE instead | |||||||||
String | APPEND_FOR_LAST_AUDIBLE | Appended to various volume related settings to record the previous values before they the settings were affected by a silent/vibrate ringer mode change. | |||||||||
String | AUTO_TIME | This constant was deprecated in API level 17. Use AUTO_TIME instead | |||||||||
String | AUTO_TIME_ZONE | This constant was deprecated in API level 17. Use AUTO_TIME_ZONE instead | |||||||||
String | BLUETOOTH_DISCOVERABILITY | Determines whether remote devices may discover and/or connect to this device. | |||||||||
String | BLUETOOTH_DISCOVERABILITY_TIMEOUT | Bluetooth discoverability timeout. | |||||||||
String | BLUETOOTH_ON | This constant was deprecated in API level 3. Use BLUETOOTH_ON instead | |||||||||
String | DATA_ROAMING | This constant was deprecated in API level 3. Use DATA_ROAMING instead | |||||||||
String | DATE_FORMAT | Date format string mm/dd/yyyy dd/mm/yyyy yyyy/mm/dd | |||||||||
String | DEBUG_APP | This constant was deprecated in API level 17. Use DEBUG_APP instead | |||||||||
String | DEVICE_PROVISIONED | This constant was deprecated in API level 3. Use DEVICE_PROVISIONED instead | |||||||||
String | DIM_SCREEN | This constant was deprecated in API level 17. This setting is no longer used. | |||||||||
String | DTMF_TONE_WHEN_DIALING | Whether the audible DTMF tones are played by the dialer when dialing. | |||||||||
String | END_BUTTON_BEHAVIOR | What happens when the user presses the end call button if they’re not on a call. | |||||||||
String | FONT_SCALE | Scaling factor for fonts, float. | |||||||||
String | HAPTIC_FEEDBACK_ENABLED | Whether the haptic feedback (long presses, . ) are enabled. | |||||||||
String | HTTP_PROXY | This constant was deprecated in API level 3. Use HTTP_PROXY instead | |||||||||
String | INSTALL_NON_MARKET_APPS | This constant was deprecated in API level 3. Use INSTALL_NON_MARKET_APPS instead | |||||||||
String | LOCATION_PROVIDERS_ALLOWED | This constant was deprecated in API level 3. Use LOCATION_PROVIDERS_ALLOWED instead | |||||||||
String | LOCK_PATTERN_ENABLED | This constant was deprecated in API level 8. Use LOCK_PATTERN_ENABLED instead | |||||||||
String | LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED | This constant was deprecated in API level 8. Use LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED instead | |||||||||
String | LOCK_PATTERN_VISIBLE | This constant was deprecated in API level 8. Use LOCK_PATTERN_VISIBLE instead | |||||||||
String | LOGGING_ID | This constant was deprecated in API level 3. Use LOGGING_ID instead | |||||||||
String | MODE_RINGER | This constant was deprecated in API level 17. Use MODE_RINGER instead | |||||||||
String | MODE_RINGER_STREAMS_AFFECTED | Determines which streams are affected by ringer mode changes. | |||||||||
String | MUTE_STREAMS_AFFECTED | Determines which streams are affected by mute. | |||||||||
String | NETWORK_PREFERENCE | This constant was deprecated in API level 3. Use NETWORK_PREFERENCE instead | |||||||||
String | NEXT_ALARM_FORMATTED | A formatted string of the next alarm that is set, or the empty string if there is no alarm set. | |||||||||
String | NOTIFICATION_SOUND | Persistent store for the system-wide default notification sound. | |||||||||
String | PARENTAL_CONTROL_ENABLED | This constant was deprecated in API level 3. Use PARENTAL_CONTROL_ENABLED instead | |||||||||
String | PARENTAL_CONTROL_LAST_UPDATE | This constant was deprecated in API level 3. Use PARENTAL_CONTROL_LAST_UPDATE instead | |||||||||
String | PARENTAL_CONTROL_REDIRECT_URL | This constant was deprecated in API level 3. Use PARENTAL_CONTROL_REDIRECT_URL instead | |||||||||
String | RADIO_BLUETOOTH | This constant was deprecated in API level 17. Use RADIO_BLUETOOTH instead | |||||||||
String | RADIO_CELL | This constant was deprecated in API level 17. Use RADIO_CELL instead | |||||||||
String | RADIO_NFC | This constant was deprecated in API level 17. Use RADIO_NFC instead | |||||||||
String | RADIO_WIFI | This constant was deprecated in API level 17. Use RADIO_WIFI instead | |||||||||
String | RINGTONE | Persistent store for the system-wide default ringtone URI. | |||||||||
String | SCREEN_BRIGHTNESS | The screen backlight brightness between 0 and 255. | |||||||||
String | SCREEN_BRIGHTNESS_MODE | Control whether to enable automatic brightness mode. | |||||||||
int | SCREEN_BRIGHTNESS_MODE_AUTOMATIC | SCREEN_BRIGHTNESS_MODE value for automatic mode. | |||||||||
int | SCREEN_BRIGHTNESS_MODE_MANUAL | SCREEN_BRIGHTNESS_MODE value for manual mode. | |||||||||
String | SCREEN_OFF_TIMEOUT | The timeout before the screen turns off. | |||||||||
String | SETTINGS_CLASSNAME | This constant was deprecated in API level 3. Use SETTINGS_CLASSNAME instead | |||||||||
String | SETUP_WIZARD_HAS_RUN | Whether the setup wizard has been run before (on first boot), or if it still needs to be run. | |||||||||
String | SHOW_GTALK_SERVICE_STATUS | ||||||||||
String | SHOW_PROCESSES | This constant was deprecated in API level 17. Use SHOW_PROCESSES instead | |||||||||
String | SHOW_WEB_SUGGESTIONS | This constant was deprecated in API level 11. Each application that shows web suggestions should have its own setting for this. | |||||||||
String | SOUND_EFFECTS_ENABLED | Whether the sounds effects (key clicks, lid open . ) are enabled. | |||||||||
String | STAY_ON_WHILE_PLUGGED_IN | This constant was deprecated in API level 17. Use STAY_ON_WHILE_PLUGGED_IN instead | |||||||||
String | SYS_PROP_SETTING_VERSION | ||||||||||
String | TEXT_AUTO_CAPS | Setting to enable Auto Caps in text editors. | |||||||||
String | TEXT_AUTO_PUNCTUATE | Setting to enable Auto Punctuate in text editors. | |||||||||
String | TEXT_AUTO_REPLACE | Setting to enable Auto Replace (AutoText) in text editors. | |||||||||
String | TEXT_SHOW_PASSWORD | Setting to showing password characters in text editors. | |||||||||
String | TIME_12_24 | Display times as 12 or 24 hours 12 24 | |||||||||
String | TRANSITION_ANIMATION_SCALE | This constant was deprecated in API level 17. Use TRANSITION_ANIMATION_SCALE instead | |||||||||
String | USB_MASS_STORAGE_ENABLED | This constant was deprecated in API level 3. Use USB_MASS_STORAGE_ENABLED instead | |||||||||
String | USER_ROTATION | Default screen rotation when no other policy applies. | |||||||||
String | USE_GOOGLE_MAIL | This constant was deprecated in API level 3. Use USE_GOOGLE_MAIL instead | |||||||||
String | VIBRATE_ON | Whether vibrate is on for different events. | |||||||||
String | VOLUME_ALARM | Alarm volume. | |||||||||
String | VOLUME_BLUETOOTH_SCO | Bluetooth Headset volume. | |||||||||
String | VOLUME_MUSIC | Music/media/gaming volume. | |||||||||
String | VOLUME_NOTIFICATION | Notification volume. | |||||||||
String | VOLUME_RING | Ringer volume. | |||||||||
String | VOLUME_SYSTEM | System/notifications volume. | |||||||||
String | VOLUME_VOICE | Voice call volume. | |||||||||
String | WAIT_FOR_DEBUGGER | This constant was deprecated in API level 17. Use WAIT_FOR_DEBUGGER instead | |||||||||
String | WALLPAPER_ACTIVITY | This constant was deprecated in API level 17. Use WallpaperManager instead. | |||||||||
String | WIFI_MAX_DHCP_RETRY_COUNT | This constant was deprecated in API level 3. Use WIFI_MAX_DHCP_RETRY_COUNT instead | |||||||||
String | WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS | This constant was deprecated in API level 3. Use WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS instead | |||||||||
String | WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON | This constant was deprecated in API level 3. Use WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON instead | |||||||||
String | WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY | This constant was deprecated in API level 3. Use WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY instead | |||||||||
String | WIFI_NUM_OPEN_NETWORKS_KEPT | This constant was deprecated in API level 3. Use WIFI_NUM_OPEN_NETWORKS_KEPT instead | |||||||||
String | WIFI_ON | This constant was deprecated in API level 3. Use WIFI_ON instead | |||||||||
String | WIFI_SLEEP_POLICY | This constant was deprecated in API level 17. Use WIFI_SLEEP_POLICY instead | |||||||||
int | WIFI_SLEEP_POLICY_DEFAULT | This constant was deprecated in API level 17. Use WIFI_SLEEP_POLICY_DEFAULT instead | |||||||||
int | WIFI_SLEEP_POLICY_NEVER | This constant was deprecated in API level 17. Use WIFI_SLEEP_POLICY_NEVER instead | |||||||||
int | WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED | This constant was deprecated in API level 17. Use WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED instead | |||||||||
String | WIFI_STATIC_DNS1 | This constant was deprecated in API level 17. Use WifiManager instead | |||||||||
String | WIFI_STATIC_DNS2 | This constant was deprecated in API level 17. Use WifiManager instead | |||||||||
String | WIFI_STATIC_GATEWAY | This constant was deprecated in API level 17. Use WifiManager instead | |||||||||
String | WIFI_STATIC_IP | This constant was deprecated in API level 17. Use WifiManager instead | |||||||||
String | WIFI_STATIC_NETMASK | This constant was deprecated in API level 17. Use WifiManager instead | |||||||||
String | WIFI_USE_STATIC_IP | This constant was deprecated in API level 17. Use WifiManager instead | |||||||||
String | WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE | This constant was deprecated in API level 3. Use WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE instead | |||||||||
String | WIFI_WATCHDOG_AP_COUNT | This constant was deprecated in API level 3. Use WIFI_WATCHDOG_AP_COUNT instead | |||||||||
String | WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS | This constant was deprecated in API level 3. Use WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS instead | |||||||||
String | WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED | This constant was deprecated in API level 3. Use WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED instead | |||||||||
String | WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS | This constant was deprecated in API level 3. Use WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS instead | |||||||||
String | WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT | This constant was deprecated in API level 3. Use WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT instead | |||||||||
String | WIFI_WATCHDOG_MAX_AP_CHECKS | This constant was deprecated in API level 3. Use WIFI_WATCHDOG_MAX_AP_CHECKS instead | |||||||||
String | WIFI_WATCHDOG_ON | This constant was deprecated in API level 3. Use WIFI_WATCHDOG_ON instead | |||||||||
String | WIFI_WATCHDOG_PING_COUNT | This constant was deprecated in API level 3. Use WIFI_WATCHDOG_PING_COUNT instead | |||||||||
String | WIFI_WATCHDOG_PING_DELAY_MS | This constant was deprecated in API level 3. Use WIFI_WATCHDOG_PING_DELAY_MS instead | |||||||||
String | WIFI_WATCHDOG_PING_TIMEOUT_MS | This constant was deprecated in API level 3. Use WIFI_WATCHDOG_PING_TIMEOUT_MS instead | |||||||||
String | WINDOW_ANIMATION_SCALE | This constant was deprecated in API level 17. Use WINDOW_ANIMATION_SCALE instead |
[Expand]
|
---|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CONTENT_URI | The content:// style URL for this table | ||||||||||
DEFAULT_ALARM_ALERT_URI | A Uri that will point to the current default alarm alert at any given time. | ||||||||||
DEFAULT_NOTIFICATION_URI | A Uri that will point to the current default notification sound at any given time. | ||||||||||
DEFAULT_RINGTONE_URI | A Uri that will point to the current default ringtone at any given time. | ||||||||||
VOLUME_SETTINGS | The mapping of stream type (integer) to its setting. |
Public Constructors |
---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constantspublic static final String ACCELEROMETER_ROTATIONControl whether the accelerometer will be used to change screen orientation. If 0, it will not be used unless explicitly requested by the application; if 1, it will be used by default unless explicitly disabled by the application. public static final String ADB_ENABLEDThis constant was deprecated in API level 3. public static final String AIRPLANE_MODE_ONThis constant was deprecated in API level 17. public static final String AIRPLANE_MODE_RADIOSThis constant was deprecated in API level 17. public static final String ALARM_ALERTPersistent store for the system-wide default alarm alert. See Alsopublic static final String ALWAYS_FINISH_ACTIVITIESThis constant was deprecated in API level 17. If 1, the activity manager will aggressively finish activities and processes as soon as they are no longer needed. If 0, the normal extended lifetime is used. public static final String ANDROID_IDThis constant was deprecated in API level 3. public static final String ANIMATOR_DURATION_SCALEThis constant was deprecated in API level 17. Scaling factor for Animator-based animations. This affects both the start delay and duration of all such animations. Setting to 0 will cause animations to end immediately. The default value is 1. public static final String APPEND_FOR_LAST_AUDIBLEAppended to various volume related settings to record the previous values before they the settings were affected by a silent/vibrate ringer mode change. public static final String AUTO_TIMEThis constant was deprecated in API level 17. public static final String AUTO_TIME_ZONEThis constant was deprecated in API level 17. public static final String BLUETOOTH_DISCOVERABILITYDetermines whether remote devices may discover and/or connect to this device. 2 — discoverable and connectable 1 — connectable but not discoverable 0 — neither connectable nor discoverable public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUTBluetooth discoverability timeout. If this value is nonzero, then Bluetooth becomes discoverable for a certain number of seconds, after which is becomes simply connectable. The value is in seconds. public static final String BLUETOOTH_ONThis constant was deprecated in API level 3. public static final String DATA_ROAMINGThis constant was deprecated in API level 3. public static final String DATE_FORMATDate format string mm/dd/yyyy dd/mm/yyyy yyyy/mm/dd public static final String DEBUG_APPThis constant was deprecated in API level 17. Name of an application package to be debugged. public static final String DEVICE_PROVISIONEDThis constant was deprecated in API level 3. public static final String DIM_SCREENThis constant was deprecated in API level 17. Whether or not to dim the screen. 0=no 1=yes public static final String DTMF_TONE_WHEN_DIALINGWhether the audible DTMF tones are played by the dialer when dialing. The value is boolean (1 or 0). public static final String END_BUTTON_BEHAVIORWhat happens when the user presses the end call button if they’re not on a call. Источник |