Status Update
Comments
ma...@ocado.com <ma...@ocado.com> #2
I have the same problem (used to work in 8.0 and stopped in 8.1 preview 1).
I call it from a `Fragment` attached as a headless-fragment (without any own view).
My Code (this returns always `<unknown_ssid>`):
```kotlin
private val wifiManager: WifiManager by lazy { context!!.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager }
private val isInCorrectWifi: Boolean
get() {
val connectionInfo = wifiManager.connectionInfo
if (SupplicantState.COMPLETED != connectionInfo.supplicantState) {
debug("isInCorrectWifi > not connected to any wifi")
return false
}
val dataReaderSSIDInMarks = "\"testWifi\""
if (dataReaderSSIDInMarks.isEmpty() || dataReaderSSIDInMarks != connectionInfo.ssid) {
debug("isInCorrectWifi: not connected to correct wifi (should be $dataReaderSSIDInMarks)")
return false
}
return true
}
```
I call it from a `Fragment` attached as a headless-fragment (without any own view).
My Code (this returns always `<unknown_ssid>`):
```kotlin
private val wifiManager: WifiManager by lazy { context!!.applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager }
private val isInCorrectWifi: Boolean
get() {
val connectionInfo = wifiManager.connectionInfo
if (SupplicantState.COMPLETED != connectionInfo.supplicantState) {
debug("isInCorrectWifi > not connected to any wifi")
return false
}
val dataReaderSSIDInMarks = "\"testWifi\""
if (dataReaderSSIDInMarks.isEmpty() || dataReaderSSIDInMarks != connectionInfo.ssid) {
debug("isInCorrectWifi: not connected to correct wifi (should be $dataReaderSSIDInMarks)")
return false
}
return true
}
```
Description
When setting time zone in Apps Script it still uses GMT - 7 or similar instead of the set one. Very annoying.