Google play does this when you try to use it and do not connect to a Wi-Fi network.
photo of what I'm trying to do:

If you just run the standard
startActivity(new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK));
Then it loads the window I'm looking for. However, I want the back and next buttons to be added on top of it. It should go back to the previous window, and the next should be selected only if a network was selected and authentication was performed (if necessary). Then he will move on to another action.
I tried to implement it with fragments (one for launching a running window and another for a button), but it does not work.
This was the code that ran when the application executed
public class TestActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layfile);
}
}
public class Pactivity extends PreferenceActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
setContentView(R.layout.main);
}
}
public class Pfrag extends PreferenceFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
}
}
Here are the xml files
<?xml version="1.0" encoding="UTF-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<Preference
android:key="key"
android:title="WiFi"
android:summary="Calls WiFi">
<intent android:action="android.net.wifi.PICK_WIFI_NETWORK"/>
</Preference>
</PreferenceScreen>
, . , .
, , WifiManager.ACTION_PICK_WIFI_NETWORK?