
Solution
To display the Settings page programmatically, you can use the startActivity() method together with an
Intent object. The following shows
some examples:
//---display the main
Settings page---
startActivity(
new
Intent(Settings.ACTION_SETTINGS));
//---display the
Location access settings page---
startActivity(new
Intent(
Settings.ACTION_LOCATION_SOURCE_SETTINGS));
//---display the
Wireless & networks settings page---
startActivity(new
Intent(
Settings.ACTION_AIRPLANE_MODE_SETTINGS));
//---display the Bluetooth
settings page---
startActivity(new
Intent(
Settings.ACTION_BLUETOOTH_SETTINGS));
In general, you use the predefined constant
Settings.ACTION_ _SETTINGS. The full list can be found here: http://developer.android.com/reference/android/provider/Settings.html
No comments:
Post a Comment