|
|
@ -29,12 +29,10 @@ export class OtaWifiProvider {
|
|
|
|
return WifiStrategy.Manual
|
|
|
|
return WifiStrategy.Manual
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
// FIXME: iOS 11+ supposedly allows WiFi API queries (see WifiWizard2 docs),
|
|
|
|
this.platform.is('android') ||
|
|
|
|
// but testing in emulator gives "not supported". might be an emulator issue?
|
|
|
|
this.platform.is('ios') && this.platform.version().major >= 11
|
|
|
|
if (this.platform.is('android'))
|
|
|
|
) {
|
|
|
|
|
|
|
|
return WifiStrategy.Automatic
|
|
|
|
return WifiStrategy.Automatic
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return WifiStrategy.Manual
|
|
|
|
return WifiStrategy.Manual
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -83,7 +81,7 @@ export class OtaWifiProvider {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export enum WifiStrategy {
|
|
|
|
export enum WifiStrategy {
|
|
|
|
Automatic = 'Automatic', // android, iOS 11+
|
|
|
|
Automatic = 'Automatic', // android
|
|
|
|
Manual = 'Manual', // older iOS
|
|
|
|
Manual = 'Manual', // iOS, browser
|
|
|
|
Unavailable = 'Unavailable', // browser
|
|
|
|
Unavailable = 'Unavailable', // currently unused
|
|
|
|
}
|
|
|
|
}
|
|
|
|