Code example for SupplicantState

Methods: equals

0
            startService(context);
        } 
        else if (android.net.wifi.WifiManager.SUPPLICANT_STATE_CHANGED_ACTION.equals(intent.getAction()))
        { 
            SupplicantState extra = intent.getParcelableExtra(android.net.wifi.WifiManager.EXTRA_NEW_STATE);
            if (extra.equals(SupplicantState.COMPLETED))
            { 
                WifiManager manager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
                startService(context, manager.getConnectionInfo().getSSID());
            } 
        } 
    } 
 
    private void startService(Context context)
    { 
        startService(context, null);
    } 
 
    private void startService(Context context, String connectedTo)
    { 
        Intent serviceIntent = new Intent(context, LocationService.class);