@ RequiresPermission ( ACCESS_WIFI_STATE ) public static Observable < WifiSignalLevel > observeWifiSignalLevel ( final Context context ) { return observeWifiSignalLevel ( context , WifiSignalLevel . getMaxLevel ( ) ) . map ( new Function < Integer , WifiSignalLevel > ( ) { @ Override public WifiSignalLevel apply ( Integer level ) throws Exception { return WifiSignalLevel . fromLevel ( level ) ; } } ) ; }
Observes WiFi signal level with predefined max num levels . Returns WiFi signal level as enum with information about current level