Here's the scenario, I have a
WifiManager wifiManager = (WifiManager)getSystemService(Context.WIFI_SERVICE);
String ipAddress = wifiManager.getConnectionInfo().getIpAddress();
LoginActivity has leaked IntentReceiver android.net.wifi.WifiManager
that was originally registered here. Are you missing a call to
I had the same error, but only when running in debug for some reason.
getApplicationContext() fixed the issue for me. (Although I'm not entirely sure why?)
WifiManager wifi_manager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);