There are a few things I have to do with the WiFi setting in boot (setupwizard,guide), such as the following:
Intent Intent = new Intent (); Intent.setclassname ("Com.android.settings", "com.android.settings.wifi.WifiSetupActivity"); Intent.putextra (" FirstRun ", true); startactivity (intent);
Suppose you need to add some of your own stuff to this WiFi setup interface, you need to write setup_preference this layout. For security reasons (changes will not affect other aspects), my practice is to copy setup_preference for wizard_setup_preference to rewrite, copy wifisettings for wizardwifisettings to overwrite.
Note that wizardwifisettings extends preferenceactivity is no longer restrictedsettingsfragment, and Configure Wizardwifisettings in Androidmanifest.xml.
The changes that are also corresponding to the start WiFi Settings item:
Intent Intent = new Intent (); Intent.setclassname ("Com.android.settings", "com.android.settings.wifi.WizardWifiSettings"); StartActivity ( Intent);
Android tips-boot start WiFi settings