Gear S: SM-R750
Tizen 2.2.1.4: R750XXU1BOC1
Tizen SDK for Wearable 1.0.0
Description:
I'd like to receive the signalStrength of Wifi connection in a WebApp on a Samsung Gear S as fast as possible, but the value does not refresh. I'm using tizen.systeminfo.getProptertyValue("WIFI_NETWORK", ...) and tizen.systeminfo.addPropertyValueChangeListener("WIFI_NETWORK", ...). The value changes only after restarting Wifi (longpress button -> Wifi) and after connecting to a network. How often should the value be updated or is this bugged?
Code:
var refreshTimer = 100; $(window).load(function(){ document.addEventListener('tizenhwkey', function(e) { tizen.application.getCurrentApplication().exit(); }); function onSucc(wifi) { if (wifi.status === "ON") console.log(wifi.signalStrength); else console.log(OFF); } setInterval(function() { console.log("REQUEST:"); tizen.systeminfo.getPropertyValue("WIFI_NETWORK", onSucc, onErr); }, refreshTimer); function onWifiChanged(wifi) { console.log("wifi changed:"); console.log(wifi); } tizen.systeminfo.addPropertyValueChangeListener("WIFI_NETWORK", onWifiChanged); });
Config:
<feature name="http://tizen.org/feature/screen.size.all"/> <feature name="http://tizen.org/feature/network.wifi"/> <feature name="http://tizen.org/feature/network.internet"/> <tizen:privilege name="http://tizen.org/privilege/internet"/>
Expected:
Polled value should be updated.