Created
August 18, 2014 19:20
-
-
Save pwittchen/21f33d97db460513440f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Subscribe | |
public void connectivityStatusChanged(ConnectivityStatusChangedEvent event) { | |
// you can perform here any action you want to | |
// in this example we are displaying toast with Connectivity Status | |
// and another toast with WiFi info | |
Toast.makeText(this, event.getConnectivityStatus().toString(), Toast.LENGTH_SHORT).show(); | |
Toast.makeText(this, event.getWifiInfo().toString(), Toast.LENGTH_SHORT).show(); | |
} | |
@Subscribe | |
public void wifiAccessPointsRefreshed(WifiAccessPointsSignalStrengthChangedEvent event) { | |
// you can perform here any action you want to | |
// in this example we are retrieving list of available access points | |
// and storing it on the List | |
WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); | |
List<ScanResult> accessPoints = wifiManager.getScanResults(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment