1
votes

I am desperately looking for an issue in order to be able to switch OFF/ON the WiFi in Google Glass using GDK.

I tried using the WifiManager but it doesn't work. Here is my code:

WifiManager  wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);   
wifi.isWifiEnabled();// return true, wifi is enabled
wifi.setWifiEnabled(false);
wifi.isWifiEnabled();// return true, wifi is enabled

I also added these permissions in my Manifest :

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.UPDATE_DEVICE_STATS" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />

Glass version : XE18.11

Can anyone help me to disable WiFi on Google Glass?

1

1 Answers

0
votes

As far as I know till now its not possible to access the WiFi from your code using GDK. I faced same problem and wrote a question here. We have to wait for official release version of Google Glass OS where they will provide the access of WiFi from Glass.