There are some WiFi settings in boot (setupwizard,guide), and I'll do the following:
Intent Intent = new Intent (); Intent.setclassname ("Com.android.settings", "com.android.settings.wifi.WifiSetupActivity"); Intent.putextra (" FirstRun ", false); startactivity (intent);
If you need to add some of your stuff to this WiFi setup, you need to write the layout of setup_preference. For security reasons (changes will affect other aspects), my practice is to replicate setup_preference for wizard_setup_preference, copy wifisettings for wizardwifisettings to overwrite.
Note that wizardwifisettings extends preferenceactivity is no longer restrictedsettingsfragment, and Configure Wizardwifisettings in Androidmanifest.xml.
The start WiFi settings item also changes accordingly:
Intent Intent = new Intent (); Intent.setclassname ("Com.android.settings", "com.android.settings.wifi.WizardWifiSettings"); StartActivity ( Intent);
Android tips-boot start WiFi settings