Hi,
I'm trying to block the wifi connections. I want my application to turn on
the wifi, but does not connect to any network that is already stored on the
smartphone. But even after I use the SCAN_ONLY mode, he continues to
connect to networks that already "know".
.....
wifiManager = (WifiManager)
context.getSystemService(Context.WIFI_SERVICE);
.....
wifiManager.setWifiEnabled(true);
WifiLock scanOnly =
wifiManager.createWifiLock(WifiManager.WIFI_MODE_SCAN_ONLY, "scanOnly");
scanOnly.acquire();
Already in despair i tried to disconnect after to make sure that the state
is WIFI_STATE_ENABLED wifi. That the app can not connect for a few seconds,
but after some time it connects to a network in the same ...
wifiManager.setWifiEnabled(true);
....
WHEN (WIFI STATE == WIFI_STATE_ENABLED)
{wifiManager.disconnect();
scanOnly.acquire();}
Can someone help me?
Tks
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en