Example usage for android.net.wifi WifiInfo toString

List of usage examples for android.net.wifi WifiInfo toString

Introduction

In this page you can find the example usage for android.net.wifi WifiInfo toString.

Prototype

@Override
    public String toString() 

Source Link

Usage

From source file:Main.java

public static String getWifiName(Context ctx) {
    WifiManager wifiManager = (WifiManager) ctx.getSystemService(Context.WIFI_SERVICE);
    WifiInfo wifiInfo = wifiManager.getConnectionInfo();
    Log.d("wifiInfo", wifiInfo.toString());
    Log.d("SSID", wifiInfo.getSSID());
    return wifiInfo.getSSID();
}