Sometimes, you want to set wifi, bluetooth and others setting then from programmatically do things here in your code
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));
Output Looks Like:
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
Happy Coding!!!