Before, we typically call system settings (Time settings, network settings, and so on) in the following way:
1 New Intent (); 2 New ComponentName ("Com.android.settings",3 "com.android.settings.WirelessSettings"); 4 Intent.setcomponent (CN); 5 intent.setaction ("Android.intent.action.VIEW"); 6 startactivity (intent);
However, after testing, the use of the SDK4.0 version will throw an exception, then we can use the following way to invoke the System Setup interface:
New Intent (Android.provider.Settings.ACTION_WIRELESS_SETTINGS); StartActivity (Intent);
Using the fields below, you can open the appropriate system Setup interface in your software:
Android.provider.Settings.ACTION_SETTINGS //System settings
Android.provider.Settings.ACTION_APN_SETTINGS //access point settings
Android.provider.Settings.ACTION_SOUND_SETTINGS //Sound Settings
Android.provider.Settings.ACTION_WIRELESS_SETTINGS //Network Settings
Android.provider.Settings.ACTION_SECURITY_SETTINGS //Security Settings
Android.provider.Settings.ACTION_WIFI_SETTINGS //wifi Settings
Android.provider.Settings.ACTION_BLUETOOTH_SETTINGS //Bluetooth settings
Android.provider.Settings.ACTION_DATE_SETTINGS //Date and time settings
Android.provider.Settings.ACTION_BLUETOOTH_SETTINGS //Bluetooth settings
Here is only a list of commonly used fields, the other can be found in the official source code, is not very simple?!
Android Development How to quickly invoke system settings