Search Results

Search found 1 results on 1 pages for 'user986474'.

Page 1/1 | 1 

  • wifi disconnect event

    - by user986474
    when i get disconnect event by this code : public class WifiReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { String ssid="someSsidName"; ConnectivityManager conMan = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); NetworkInfo netInfo = conMan.getActiveNetworkInfo(); WifiInfo wifiInfo = null; if (netInfo.getType() == ConnectivityManager.TYPE_WIFI) { //android connect to wifi } else{ //do somthing } } } i try to know what the ssid name when android disconnect. i mean when android disconnect from wifi i need to know it (this i can know by my code) but what i missing is the ssid name android just disconnect from. there is a way to do that? (i know i can save the name when android connect to wifi and use this name when disconnect but this not the way i want...) thanks in advance!

    Read the article

1