My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 3641: WifiInfo() reporting out-of-date information
2 people starred this issue and may be notified of changes. Back to list
Status:  Obsolete
Owner:  ----
Closed:  Jun 2013


Sign in to add a comment
 
Reported by pga...@gmail.com, Aug 23, 2009
On an HTC Hero, calling getConnectionInfo() returns a WifiInfo object with out of date 
information in it.  For example, even with WiFi turned off, this object contains an IP address and 
the SSID of the last connected access point.  

Sample source:

public boolean isHighSpeedConnection()
    {
        WifiManager wifiMan = (WifiManager)getSystemService(Context.WIFI_SERVICE);
        
    	// Check for connected WiFi network - if so, return true.
    	WifiInfo wifiInfo = wifiMan.getConnectionInfo();
    	if (wifiInfo.getNetworkId() != -1)
    	{
    		if (Config.LOGD) Log.d(TAG, "WiFi Connected (" + wifiInfo.getSSID() + ")");
    		return true;
    	}
    	
    	
    	return false;
    }

It makes no difference whether the wifimanager is set up in the onCreate method or elsewhere 
in the program.  I did wonder whether it would be worth trying to instantiate a new one, but that 
obviously goes against the development guidelines.
Aug 24, 2009
#1 jbq+legacy@google.com
(No comment was entered for this change.)
Labels: Component-System
Aug 27, 2009
#2 jbq+legacy@google.com
(No comment was entered for this change.)
Labels: -Component-System Component-Device
Sep 18, 2009
#3 jbq+legacy@google.com
(No comment was entered for this change.)
Labels: Subcomponent-Wifi
Jun 14, 2011
#4 hamsterr...@gmail.com
Similar on Samsung Galaxy S (Android 2.2.1)
Jun 23, 2013
#5 jbq@android.com
Based on its date, this issue was originally reported before Android 4.x. Because of the many changes that existed in Android 4.x compared to previous versions, it's very likely that this issue doesn't exist in recent versions of Android like 4.2.2 or newer. Because of the high likelihood that this issue is obsolete, it is getting closed automatically by a script, without a human looking at it in detail. If the issue still exists on a Nexus 4 or Nexus 7 running Android 4.2.2 and is not related to Google applications, please open a new report accordingly.

Status: Obsolete
Sign in to add a comment

Powered by Google Project Hosting