Android How to - Run Wifi Settings








Question

We would like to know how to run Wifi Settings.

Answer

//www .  ja v  a 2  s .c  o m
import android.content.Context;
import android.content.Intent;

class ActivityHelper 
{
    public void runWifiSettings(Context ctx)
    {
        Intent iIntent = new Intent(android.provider.Settings.ACTION_WIFI_SETTINGS);
        iIntent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
        ctx.startActivity(iIntent);
    }
}