I am developing an android application in which I have to call wireless settings activity of android from my activity. I am using this code
Intent i = new Intent();
final ComponentName cn = new ComponentName("com.android.settings",
"com.android.settings.WirelessSettings");
i.setComponent(cn);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
This code works fine upto android 2.3.7.But when I run it on android 4.0.1 (ICS)
it gives me following error.
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.settings/com.android.settings.WirelessSettings}; have you declared this activity in your AndroidManifest.xml?
I check into source code of android and found that , In android 2.3.7 WirelessSettings is an activity and in android 4.0.1 wireless settings changed to fragment . Have a look at these 2 pictures.


Thank you for your help.
You can use following code for opening Wireless setting screen