WifiTools

object WifiTools

Provider for WiFi read tools: GetWifiInfoTool and ListSavedNetworksTool. Requires ACCESS_WIFI_STATE and ACCESS_FINE_LOCATION (location gates SSID/BSSID on API 26+).

Functions

Link copied to clipboard
fun all(context: Context): List<McpTool>

Both WiFi tools.

Link copied to clipboard

True when both WiFi-state and fine-location permissions are granted.

Link copied to clipboard

ACCESS_WIFI_STATE, ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION. COARSE is listed because Android 12+ only grants FINE when both are requested together; a user who picks "approximate" gets COARSE only, which isn't enough to read the SSID.